For access to the /api/v2/destinations endpoint you must be Authenticated.
The index endpoint that returns all destinations for a given user. Example payload:
[
{
"_id": "5727baba2095629e622c2913",
"notes": "A Destination with a Meta Message",
"metaMessage": "573a372ba78feff835169137",
"tapAction": "573a372ba78feff835163291",
"proximity": 2,
"name": "Destination Update API"
}
]
The endpoint for an individual destination with populated properties. It requires the ID of the destination.
Example payload:
{
"_id": "5727baba2095629e622c2913",
"notes": "An individual destination with a meta message",
"metaMessage": {
"_id": "573a372ba78feff835169137",
"title": "My Title",
"description": "My Description",
"imageUrl": "https://example.com/image.png"
},
"tapAction": {
"_id": "573a372ba78feff835163291",
"touchpointType": "Redirect",
"to": "https://www.phy.net",
}
"name": "Destination woohoo"
}
Create a new Destination resource with a Meta Message and Tap Action resource.
Parameters that can be passed up:
| Parameter | Example | Notes |
|---|---|---|
| "name" | "Landing Page" | String defaults to "My Destination" - Optional |
| "notes" | "a url for our landing page!" | String - Optional. |
| "metaMessage" | { |
Object - Optional. See CoverCards API docs for more options |
| "tapAction" | { |
Object - Optional. See Tap Actions API docs for more options |
200 Response Payload returns the newly created instance of a Destination. Example:
{
"notes":"a url for our landing page!",
"metaMessage":"5760549780b69d2a67c4443d",
"tapAction": "5727baba2095629e622c2913",
"_id":"5760549780b69d2a67c4443c",
"name":"Landing Page"
}
Update an existing Destination by Destination ID.
Arguments:
| Parameter | Example | Notes |
|---|---|---|
| "name" | "Landing Page" | String defaults to "My Destination" - Optional |
| "notes" | "a url for our landing page!" | String - Optional. |
| "metaMessage" | { |
Object - Optional. See CoverCards API docs for more options |
| "tapAction" | { |
Object - Optional. See TapActions API docs for more options |
Example response:
{
"_id":"5760549780b69d2a67c4443c",
"notes":"an updated url for our landing page!",
"metaMessage":{
"_id":"5760549780b69d2a67c4443d",
"title":"Landing on Google",
"description":"a custom description of Google",
"imageUrl":null
},
"name":"Landing Page Updated"
}
Delete an existing Destination via Destination ID
There is no response other than a 204 status code
Upon error, the client will receive a JSON response in the format of:
{
message: <intl error message>,
error: <boolean>,
statusCode: <int>
}