I'm trying to integrate my site with the affiliate programme available here - https://www.gadventures.co.uk/affiliate-program
I have asked for their support and received a number of replies but I think it's beyond my skill level.
I don't really know the level of detail you will need in order to help so I've pasted an email from the company below...
On 19/05/2016 19:47, API Support wrote:
This is a general overview I initially give to people. Questions might arise so please let me know!
An API is basically a service for you to request and receive data from,
updating data on the API is also possible - although you won't need it for
this specific case. I am not sure how familiar you are with GET requests so
I'll just briefly go over those as well. A GET request is something you
would use to request data from the API. Here:
https://developers.gadventures.com/docs/index.html is an example of how to
make a request to us which is requesting information about tour with
curl -H "X-Application-Key: YOUR_APPLICATION_KEY"
So to break it down a little bit, whenever you request data from us, you'll
need to pass us your key - sent over as X-Application-Key. This is given to
you in the application you registered
https://rest.gadventures.com is the root of our API and anything you can
request from this root is outlined in the Playground
(https://developers.gadventures.com/playground). The Playground is like a directory for the API - what is available to you.
From the GET request, you'll receive a JSON response. You can see what
response you'll get from what request through the Playground. For example,
it is shown that a GET request for https://rest.gadventures.com/tours/22997
"name": "Wonders of Borneo"
as it is shown here:
As for Wordpress, one way to integrate our API is to construct an HTML and put our resources into it. For example, say you wanted a few resources from the Best of
Panama in Panama tour you saw on our website (https://www.gadventures.com/trips/best-of-panama/3364/).
To be more specific, say you wanted to use:
* a few images (picture + banner)
* title of the tour
* price of the tour
* duration of the tour
Here is the Playground view of the tour:
https://developers.gadventures.com/playground/tours/22935. Although you can
request a tour directly, a tour_dossier is a more descriptive version of the
tour information. So this is the one we should request. Which means to get
it through the API, you would need to request from
https://rest.gadventures.com/tour_dossiers/22935. Here you can see the
output of this request:
this, you can see the name, the duration and the links to download the
images. The price isn't shown on a tour_dossier so you'll need another
request to the API. From the tours page, there is another link
has prices depending on the currency.
Let me know how it goes,