Approach Guides provides a complete solution for inspiring, informing and converting your customers. Our purpose-built multimedia-content platform delivers hyper-relevant, personalized engagements at all touchpoints: email, website, social and mobile.
The RESTful API makes it easy. The following technical documentation describes the resources that make up the Approach Guides API v1.0
To get started using the API, you will need an API Key and Secret. If you don't have any credentials, please contact partner@approachguides.com.
All API endpoints require basic HTTP Authentication with the API Key as the username, and the API Secret as the password. If you recieve 401 Authorization Failed error
on a request, the credentials you supplied were invalid.
All responses are returned in JSON 2and include an items
property which contains all of the data, and a meta
property which is explained below.
The API will provide a standard HTTP status code on each call, which will be one of the following.
Status Code | Description |
---|---|
200 | The request was successful. |
401, 403 | Authentication has failed, check your credentials. |
422 | Unprocessable entity. You either sent too many parameters, or not enough. A detailed error message will be returned. |
503 | Interval server error, try again later. If it persists, contact us to resolve this issue. |
All responses contain a meta
property which contains the following values.
Property | Description |
---|---|
paginated | Whether the items are paginated or not. |
count | The number of items on the current page. |
current_page | The current page. |
has_more_pages | Whether or not there are more pages of items. |
last_page | Whether or not you are on the last page. |
per_page | The number of items per page. |
total | The total number of items for all pages. |
Some endpoints will also return created_at
and updated_at
properties which contain dates and times relating to when the item was created and when it was last updated. These are Atom formatted dates that include timezone, and can readily be parsed by all coding languages, including Javascript.
Requests that return multiple items will be paginated to 15 items by default. Page numbering starts at 1.
To process additional pages of results you must supply a page
parameter e.g. ?page=10
. To verify this has worked, check the meta.current_page
property.
To set the number of items returned per request, you can supply a count
paramter e.g. ?count=50
. To verify this has worked, check the meta.per_page
property.
Below is a simple example of how to consume the Approach Guides API with PHP
code. Note that your_api_key and your_api_secret should be replaced with your API credentials.
// Connect to API and parse data
$url = "https://your_api_key:your_api_secret@api.approachguides.com/v2/destinations";
$response = file_get_contents($url);
$data = json_decode($response);
// Output the data
var_dump($data);
This endpoint returns all collections.
Endpoint | Description |
---|---|
api.approachguides.com/v2/collections | All of the collections. |
Parameter | Description |
---|---|
alt_id | The unique public ID of the collection, used in landing pages and embeds. |
user_id | The user ID that the collection belongs to. |
folder_id | The folder ID that the collection belongs to, could be null. |
type | The collection type. |
name | The collection name. |
code | The code(s) associated with the collection, separated by spaces. |
content_count | The number of content items the collection has. |
landing_page_url | The URL to the collection's landing page. |
invite_url | The URL to the content experience's invite page. |
{
"meta": {
"paginated": true,
"count": 1,
"current_page": 1,
"has_more_pages": false,
"last_page": 1,
"next_page_url": null,
"per_page": 15,
"prev_page_url": null,
"total": 1
},
"items": [
{
"id": 10,
"alt_id": "urOXY9aR",
"user_id": 1,
"folder_id": null,
"type": "partner",
"name": "Les Espanol",
"code": "",
"content_count": 5,
"landing_page_url": "https:\/\/explore.approachguides.com\/collections\/123\/2298\/DNWaLw7o",
"invite_url": "https://inspires.to/invite/10/6gPXmY3xMqTlCKdZsOovUBuVCqGu23HN",
"created_at": "2016-08-29T10:47:32+00:00",
"updated_at": "2017-01-18T09:46:34+00:00"
}
]
}
This endpoint returns all content types.
Endpoint | Description |
---|---|
api.approachguides.com/v2/content-types | All of the content types that content could be associated with. |
Parameter | Description |
---|---|
name | The content type name. |
description | The content type description. |
image | The content type image. |
weight | The weight of the content type, used for weighting search results returned by the API. |
{
"meta": {
"paginated": true,
"count": 11,
"current_page": 1,
"has_more_pages": false,
"last_page": 1,
"next_page_url": null,
"per_page": 15,
"prev_page_url": null,
"total": 11
},
"items": [
{
"id": 1,
"name": "Books",
"description": "Books & eBooks",
"image": "https:\/\/cdn.approachguides.com\/1\/tripreads-icon-category-books.jpg",
"weight": 9,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-28T09:24:49+00:00"
},
{
"id": 2,
"name": "Articles",
"description": "Articles & Academic Papers",
"image": "https:\/\/cdn.approachguides.com\/2\/tripreads-icon-category-articles.jpg",
"weight": 10,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-28T09:24:49+00:00"
},
{
"id": 3,
"name": "Online",
"description": "Online Sources & Blogs",
"image": "https:\/\/cdn.approachguides.com\/3\/tripreads-icon-category-online.jpg",
"weight": 5,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-28T09:24:49+00:00"
},
{
"id": 4,
"name": "Audio",
"description": "Podcasts & Music Playlists",
"image": "https:\/\/cdn.approachguides.com\/4\/tripreads-icon-category-audio.jpg",
"weight": 10,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-28T09:24:49+00:00"
},
{
"id": 5,
"name": "Kids",
"description": "Just for Kids",
"image": "https:\/\/cdn.approachguides.com\/5\/tripreads-icon-category-kids.jpg",
"weight": 1,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-28T09:24:49+00:00"
},
{
"id": 6,
"name": "Follow",
"description": "Who to Follow",
"image": "https:\/\/cdn.approachguides.com\/6\/tripreads-icon-category-follow.jpg",
"weight": 3,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-28T09:24:49+00:00"
},
{
"id": 7,
"name": "Map",
"description": "Get Your Bearings",
"image": null,
"weight": 0,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-19T17:00:28+00:00"
},
{
"id": 8,
"name": "Videos",
"description": "Videos that Set the Stage",
"image": "https:\/\/cdn.approachguides.com\/7\/tripreads-icon-category-film.jpg",
"weight": 10,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-28T09:24:49+00:00"
},
{
"id": 9,
"name": "Experiences",
"description": "On-Location Experiences",
"image": "https:\/\/cdn.approachguides.com\/8\/tripreads-icon-category-recommended.jpg",
"weight": 1,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-28T09:24:49+00:00"
},
{
"id": 10,
"name": "Films",
"description": "Quintessential Cinema",
"image": "https:\/\/cdn.approachguides.com\/9\/tripreads-icon-category-film.jpg",
"weight": 5,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-28T09:24:49+00:00"
},
{
"id": 11,
"name": "Apps",
"description": "Mobile Applications",
"image": "https:\/\/cdn.approachguides.com\/10\/tripreads-icon-category-app.jpg",
"weight": 7,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-28T09:24:49+00:00"
}
]
}
This endpoint returns all destinations.
Endpoint | Description |
---|---|
api.approachguides.com/v2/destinations | All of the destinations content could be associated with. |
{
"items": [
{
"id": 1,
"parent_id": null,
"name": "Africa",
"label": "Africa",
"depth": 0,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-19T17:00:28+00:00"
},
{
"id": 2,
"parent_id": 1,
"name": "Botswana",
"label": "Africa > Botswana",
"depth": 1,
"created_at": "2016-08-19T17:00:28+00:00",
"updated_at": "2016-08-21T13:21:51+00:00"
}
]
}