Wicked Reports Outbound API
API Endpoint
https://api.wickedreports.comThe Wicked Reports Outbound API allows you to retrieve data stored into Wicked Reports for analysis and/or visualization in your own interface.
Getting Started ¶
In order to start using the Wicked Reports Outbound API, you need to contact us so we can enable it for your account.
If the API is not enabled for your account you are going to receive a 401 response with the following body:
{
"status": "error",
"message": "Outbound API not enabled for client."
}
Authorization
In order to authorize with the Wicked Reports Outbound API, you need to provide a header named apikey
having your API key
as a value.
Getting an API key
You can receive an API key by enabling the API for contact and/or orders in the "Authorizations" page of your dashboard. You will get a valid API key to use with the outbound API regardless of which API you decide to enable on the Authorizations screen.
After you have enabled either the contacts or the orders API, go on and copy the string below “Your API key” in the API card and provide it as a value of the apikey
header.
You can find additional instructions on enabling the API as a data source in the video at the bottom of this help article.
Here’s an example header:
apikey: HhpTUGLq9qM5CKzaOnYpO1fU1BItrCHg
Throttling
The Wicked Reports Outbound API will by default be throttling your requests to 120 requests per minute. In the response, you are going to find the following headers that will help you control your requests:
-
x-ratelimit-limit
- The total number of requests you can make. -
x-ratelimit-remaining
- The number of requests you have remaining. -
x-ratelimit-reset
- The time when your limit resets.
Contacts ¶
With the endpoints for contacts, you can retrieve information about your contacts in Wicked Reports.
List all contacts ¶
Headers
Content-Type: application/json
Body
{
"status": "success",
"results": [
{
"id": "AB-1234567",
"sourceId": "someIdInSourceSystem",
"sourceSystem": "test",
"email": "test@example.com",
"firstName": "Test",
"lastName": "Contact",
"LTV": 0,
"createDate": "2020-07-15T00:10:17.000Z",
"firstClick": {
"date": "2020-07-28T20:48:21.000Z",
"source": "some-source",
"medium": "some-medium",
"campaign": "some-campaign",
"content": "some-content",
"term": "some-term"
},
"firstOptin": {
"date": "2020-07-28T20:48:21.000Z",
"source": "some-source",
"medium": "some-medium",
"campaign": "some-campaign",
"content": "some-content",
"term": "some-term"
},
"reOptin": {
"date": "2020-07-30T00:01:43.000Z",
"source": "Email",
"medium": "email",
"campaign": "test-campaign",
"content": "test-content",
"term": "test-term"
},
"urlWicked": "https://my.wickedreports.com/extras/customerltv?report=newlead&id=AB-1234567",
"links": {
"clicks": {
"href": "/contacts/AB-1234567/clicks"
},
"orders": {
"href": "/contacts/AB-1234567/orders"
}
}
}
],
"page": 1,
"totalPages": 10,
"total": 1575,
"next": "9c783c753b7db667d9a5c96375514040"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"success",
"error"
],
"description": "The status of the request"
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"sourceId": {
"type": "string"
},
"sourceSystem": {
"type": "string",
"description": "Source system of the contact or unknown in case the source cannot be determined."
},
"email": {
"type": "string"
},
"firstName": {
"type": [
"string",
"null"
]
},
"lastName": {
"type": [
"string",
"null"
]
},
"LTV": {
"type": "number"
},
"createDate": {
"type": [
"string",
"null"
]
},
"firstClick": {
"type": "object",
"properties": {
"date": {
"type": [
"string",
"null"
]
},
"source": {
"type": "string"
},
"medium": {
"type": "string"
},
"campaign": {
"type": "string"
},
"content": {
"type": "string"
},
"term": {
"type": "string"
}
}
},
"firstOptin": {
"type": "object",
"properties": {
"date": {
"type": [
"string",
"null"
]
},
"source": {
"type": "string"
},
"medium": {
"type": "string"
},
"campaign": {
"type": "string"
},
"content": {
"type": "string"
},
"term": {
"type": "string"
}
}
},
"reOptin": {
"type": "object",
"properties": {
"date": {
"type": [
"string",
"null"
],
"default": "null"
},
"source": {
"type": "string"
},
"medium": {
"type": "string"
},
"campaign": {
"type": "string"
},
"content": {
"type": "string"
},
"term": {
"type": "string"
}
},
"required": [
"date"
]
},
"urlWicked": {
"type": "string"
},
"links": {
"type": "object",
"properties": {
"clicks": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
},
"orders": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
}
},
"description": "Can be an empty object if the contact doesn't have any clicks"
}
},
"required": [
"id",
"sourceId",
"email",
"urlWicked"
]
}
},
"page": {
"type": "number"
},
"totalPages": {
"type": "number"
},
"total": {
"type": "number"
},
"next": {
"type": "string"
}
}
}
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "There was some problem with your request. You should review the parameters and try again."
}
List all contactsGET/contacts{?from,to,limit,next}
The contacts endpoint allows you to retrieve all contacts from your account. Note that you should always provide a time period in order to receive any data.
The links field in the response will contain an empty object, if the contact doesn’t have any clicks.
- from
string
(required) Example: 2020-07-01The start date to look for contacts. Format: YYYY-MM-DD
- to
string
(required) Example: 2020-07-02Date until which to look for contacts. Format: YYYY-MM-DD
- limit
number
(optional) Default: 100 Example: 1Number of contacts to return with a single call (max: 1000).
- next
string
(optional) Example: 9c783c753b7db667d9a5c96375514040A hash key for the next page of records. You can retrieve this key from the
next
value in the response of your first request.
Retrieve a single contact ¶
Headers
Content-Type: application/json
Body
{
"status": "success",
"result": {
"id": "AB-1234567",
"sourceId": "someIdInSourceSystem",
"sourceSystem": "test",
"email": "test@example.com",
"firstName": "Test",
"lastName": "Contact",
"LTV": 0,
"createDate": "2020-07-15T00:10:17.000Z",
"firstClick": {
"date": "2020-07-28T20:48:21.000Z",
"source": "some-source",
"medium": "some-medium",
"campaign": "some-campaign",
"content": "some-content",
"term": "some-term"
},
"firstOptin": {
"date": "2020-07-28T20:48:21.000Z",
"source": "some-source",
"medium": "some-medium",
"campaign": "some-campaign",
"content": "some-content",
"term": "some-term"
},
"reOptin": {
"date": "2020-07-30T00:01:43.000Z",
"source": "Email",
"medium": "email",
"campaign": "test-campaign",
"content": "test-content",
"term": "test-term"
},
"urlWicked": "https://my.wickedreports.com/extras/customerltv?report=newlead&id=AB-1234567",
"links": {
"clicks": {
"href": "/contacts/AB-1234567/clicks"
},
"orders": {
"href": "/contacts/AB-1234567/orders"
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"success",
"error"
]
},
"result": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"sourceId": {
"type": "string"
},
"sourceSystem": {
"type": "string",
"description": "Source system of the contact or unknown in case the source cannot be determined."
},
"email": {
"type": "string"
},
"firstName": {
"type": [
"string",
"null"
]
},
"lastName": {
"type": [
"string",
"null"
]
},
"LTV": {
"type": "number"
},
"createDate": {
"type": [
"string",
"null"
]
},
"firstClick": {
"type": "object",
"properties": {
"date": {
"type": [
"string",
"null"
]
},
"source": {
"type": "string"
},
"medium": {
"type": "string"
},
"campaign": {
"type": "string"
},
"content": {
"type": "string"
},
"term": {
"type": "string"
}
}
},
"firstOptin": {
"type": "object",
"properties": {
"date": {
"type": [
"string",
"null"
]
},
"source": {
"type": "string"
},
"medium": {
"type": "string"
},
"campaign": {
"type": "string"
},
"content": {
"type": "string"
},
"term": {
"type": "string"
}
}
},
"reOptin": {
"type": "object",
"properties": {
"date": {
"type": [
"string",
"null"
],
"default": "null"
},
"source": {
"type": "string"
},
"medium": {
"type": "string"
},
"campaign": {
"type": "string"
},
"content": {
"type": "string"
},
"term": {
"type": "string"
}
},
"required": [
"date"
]
},
"urlWicked": {
"type": "string"
},
"links": {
"type": "object",
"properties": {
"clicks": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
},
"orders": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
}
},
"description": "Can be an empty object if the contact doesn't have any clicks"
}
},
"required": [
"id",
"sourceId",
"email",
"urlWicked"
]
}
}
}
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "Contact with id AB-1234567 not found."
}
Retrieve a single contactGET/contacts/{contactId}
You can also look for a contact using their email with this endpoint. Simply provide the email in the contactId
parameter like this: /contacts/test@example.com
.
The links field in the response will contain an empty object, if the contact doesn’t have any clicks.
- contactId
string
(required) Example: AB-1234567The id of the contact to retrieve. This could be either the internal id of the contact that you can find under the
id
property or thesourceId
which is the id in your source system. You can also use an email for this parameter.
Clicks ¶
Retrieve the processed clicks from Wicked Reports.
List all clicks ¶
Headers
Content-Type: application/json
Body
{
"status": "success",
"results": [
{
"contactId": "test-contact-id",
"contactSourceId": "test-contact-source-id",
"date": "2020-07-01T00:01:43.000Z",
"email": "test@example.com",
"isFirstClick": false,
"isFirstOptin": false,
"isLastClick": false,
"isReOptin": true,
"source": "hubspot",
"utms": {
"source": "Email",
"medium": "email",
"campaign": "test-campaign",
"content": "test-content",
"term": "test-term"
},
"wickedid": "1234567",
"wickedsource": "test",
"trackingUrl": "https://example.com/tracking/url",
"links": {
"contact": {
"href": "/contacts/AB-1234567"
}
}
}
],
"page": 1,
"totalPages": 1,
"total": 1,
"next": "9c783c753b7db667d9a5c96375514040"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"success",
"error"
]
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"type": "string",
"description": "The id of the contact in Wicked Reports."
},
"contactSourceId": {
"type": "string",
"description": "The id of the contact in your source system."
},
"date": {
"type": "string",
"description": "The date and time of the click."
},
"email": {
"type": [
"string",
"null"
],
"description": "The email of the contact this clicks belong to."
},
"isFirstClick": {
"type": "boolean"
},
"isFirstOptin": {
"type": "boolean"
},
"isLastClick": {
"type": "boolean"
},
"isReOptin": {
"type": "boolean"
},
"source": {
"type": "string"
},
"utms": {
"type": "object",
"properties": {
"source": {
"type": "string"
},
"medium": {
"type": "string"
},
"campaign": {
"type": "string"
},
"content": {
"type": "string"
},
"term": {
"type": "string"
}
}
},
"wickedid": {
"type": [
"string",
"null"
]
},
"wickedsource": {
"type": [
"string",
"null"
]
},
"trackingUrl": {
"type": "string"
},
"links": {
"type": "object",
"properties": {
"contact": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
}
}
}
},
"required": [
"contactId",
"date"
]
}
},
"page": {
"type": "number"
},
"totalPages": {
"type": "number"
},
"total": {
"type": "number"
},
"next": {
"type": "string"
}
}
}
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "There was some problem with your request. You should review the parameters and try again."
}
List all clicksGET/clicks{?from,to,limit,next}
You can use this endpoint to retrieve all clicks within a certain timeframe.
The difference between parameters from
and to
cannot exceed 30 days.
Clicks that you’ve just submitted to the Wicked Reports API will not be returned by this endpoint. It might take up to 24 hours for these to appear in the response. You can use the API Verification tool in the Wicked Reports dashboard to validate data that you’ve recently sent.
- from
string
(required) Example: 2020-07-01The start date to look for clicks. Format: YYYY-MM-DD
- to
string
(required) Example: 2020-07-02The end date to look for clicks. Format: YYYY-MM-DD
- limit
integer
(optional) Default: 100 Example: 1Number of contacts to return with a single call (max: 1000).
- next
string
(optional) Example: 9c783c753b7db667d9a5c96375514040A hash key for the next page of records. You can retrieve this key from the
next
value in the response of your first request.
Retrieve the clicks of a specific contact ¶
Headers
Content-Type: application/json
Body
{
"status": "success",
"results": [
{
"contactId": "test-contact-id",
"contactSourceId": "test-contact-source-id",
"date": "2020-07-01T00:01:43.000Z",
"email": "test@example.com",
"isFirstClick": false,
"isFirstOptin": false,
"isLastClick": false,
"isReOptin": true,
"source": "hubspot",
"utms": {
"source": "Email",
"medium": "email",
"campaign": "test-campaign",
"content": "test-content",
"term": "test-term"
},
"wickedid": "1234567",
"wickedsource": "test",
"trackingUrl": "https://example.com/tracking/url",
"links": {
"contact": {
"href": "/contacts/AB-1234567"
}
}
}
],
"page": 1,
"totalPages": 1,
"total": 1,
"next": "9c783c753b7db667d9a5c96375514040"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"success",
"error"
]
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"type": "string",
"description": "The id of the contact in Wicked Reports."
},
"contactSourceId": {
"type": "string",
"description": "The id of the contact in your source system."
},
"date": {
"type": "string",
"description": "The date and time of the click."
},
"email": {
"type": [
"string",
"null"
],
"description": "The email of the contact this clicks belong to."
},
"isFirstClick": {
"type": "boolean"
},
"isFirstOptin": {
"type": "boolean"
},
"isLastClick": {
"type": "boolean"
},
"isReOptin": {
"type": "boolean"
},
"source": {
"type": "string"
},
"utms": {
"type": "object",
"properties": {
"source": {
"type": "string"
},
"medium": {
"type": "string"
},
"campaign": {
"type": "string"
},
"content": {
"type": "string"
},
"term": {
"type": "string"
}
}
},
"wickedid": {
"type": [
"string",
"null"
]
},
"wickedsource": {
"type": [
"string",
"null"
]
},
"trackingUrl": {
"type": "string"
},
"links": {
"type": "object",
"properties": {
"contact": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
}
}
}
},
"required": [
"contactId",
"date"
]
}
},
"page": {
"type": "number"
},
"totalPages": {
"type": "number"
},
"total": {
"type": "number"
},
"next": {
"type": "string"
}
}
}
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "There was some problem with your request. You should review the parameters and try again."
}
Retrieve the clicks of a specific contactGET/contacts/{contactId}/clicks{?from,to,limit,next}
You can use this endpoint to retrieve all clicks of a single contact within a specified time frame.
The first 10,000 clicks of a single contact will be returned paginated. If the contact has more, you will have to use the from
and to
parameters to retrieve any clicks after the 10,000th. The difference between the parameters from
and to
cannot exceed 180 days in this case.
- contactId
string
(required) Example: test-contact-idThe id of the contact whose clicks you would like to receive. This could be either the internal id of the contact that you can find under the
contactId
property or thecontactSourceId
which is the id in your source system. You can also use an email for this parameter.- from
string
(optional) Example: 2020-07-01The start date to look for clicks. Format: YYYY-MM-DD
- to
string
(optional) Example: 2020-07-30The end date to look for clicks. Format: YYYY-MM-DD
- limit
number
(optional) Default: 100 Example: 100Maximum number of clicks to retrieve per page. (max: 1000)
- next
string
(optional) Example: 9c783c753b7db667d9a5c96375514040A hash key for the next page of records. You can retrieve this key from the
next
value in the response of your first request.
Orders ¶
Retrieve tracked orders by WickedReports.
List all orders ¶
Headers
Content-Type: application/json
Body
{
"status": "success",
"results": [
{
"id": "WR-order-id",
"sourceId": "test-source-order-id",
"sourceSystem": "stripe",
"date": "2020-06-18T06:00:27.000Z",
"attributions": {
"firstClick": {
"date": "2020-06-18T02:00:27",
"source": "direct",
"medium": "direct",
"campaign": "direct",
"content": "direct",
"term": "direct"
},
"firstOptin": {
"date": "2020-06-18T02:00:27",
"source": "direct",
"medium": "direct",
"campaign": "direct",
"content": "direct",
"term": "direct"
},
"reOptin": {
"date": "2020-06-18T02:00:27",
"source": "direct",
"medium": "direct",
"campaign": "direct",
"content": "direct",
"term": "direct"
},
"lastClick": {
"date": "2020-06-18T02:00:27",
"source": "direct",
"medium": "direct",
"campaign": "direct",
"content": "direct",
"term": "direct"
}
},
"contact": {
"id": "AB-1234567",
"sourceId": "test-source-contact-id",
"sourceSystem": "unknown",
"email": "test@example.com"
},
"products": [
{
"id": "test-product-id",
"name": "Awesome Subscription Plan",
"qty": 1,
"PPU": 79
}
],
"payments": [
{
"date": "2020-06-18T02:00:27",
"status": "APPROVED",
"amount": 79
}
],
"amount": 79,
"currency": "USD",
"subscriptionId": "test-subscription-1234567",
"links": {
"contact": {
"href": "/contacts/AB-1234567"
},
"clicks": {
"href": "/contacts/AB-1234567/clicks"
}
}
}
],
"page": 1,
"totalPages": 1,
"total": 1,
"next": "9c783c753b7db667d9a5c96375514040"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"success",
"error"
]
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"sourceId": {
"type": "string"
},
"sourceSystem": {
"type": [
"string",
"null"
]
},
"date": {
"type": "string"
},
"attributions": {
"type": "object",
"properties": {
"firstClick": {
"type": "object",
"properties": {
"date": {
"type": "string",
"default": "null"
},
"source": {
"type": [
"string",
"null"
]
},
"medium": {
"type": [
"string",
"null"
]
},
"campaign": {
"type": [
"string",
"null"
]
},
"content": {
"type": [
"string",
"null"
]
},
"term": {
"type": [
"string",
"null"
]
}
}
},
"firstOptin": {
"type": "object",
"properties": {
"date": {
"type": "string",
"default": "null"
},
"source": {
"type": [
"string",
"null"
]
},
"medium": {
"type": [
"string",
"null"
]
},
"campaign": {
"type": [
"string",
"null"
]
},
"content": {
"type": [
"string",
"null"
]
},
"term": {
"type": [
"string",
"null"
]
}
}
},
"reOptin": {
"type": "object",
"properties": {
"date": {
"type": "string",
"default": "null"
},
"source": {
"type": [
"string",
"null"
]
},
"medium": {
"type": [
"string",
"null"
]
},
"campaign": {
"type": [
"string",
"null"
]
},
"content": {
"type": [
"string",
"null"
]
},
"term": {
"type": [
"string",
"null"
]
}
}
},
"lastClick": {
"type": "object",
"properties": {
"date": {
"type": "string",
"default": "null"
},
"source": {
"type": [
"string",
"null"
]
},
"medium": {
"type": [
"string",
"null"
]
},
"campaign": {
"type": [
"string",
"null"
]
},
"content": {
"type": [
"string",
"null"
]
},
"term": {
"type": [
"string",
"null"
]
}
}
}
}
},
"contact": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"sourceId": {
"type": "string"
},
"sourceSystem": {
"type": "string"
},
"email": {
"type": "string"
}
},
"required": [
"id",
"sourceId"
]
},
"products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"qty": {
"type": "number"
},
"PPU": {
"type": "number"
}
}
}
},
"payments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"APPROVED",
"FAILED",
"REFUNDED",
"Partially Refunded",
"MANUAL"
]
},
"amount": {
"type": "number"
}
}
}
},
"amount": {
"type": "number"
},
"currency": {
"type": "string"
},
"subscriptionId": {
"type": "string"
},
"links": {
"type": "object",
"properties": {
"contact": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
},
"clicks": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
}
}
}
},
"required": [
"id",
"sourceId",
"date"
]
}
},
"page": {
"type": "number"
},
"totalPages": {
"type": "number"
},
"total": {
"type": "number"
},
"next": {
"type": "string"
}
}
}
List all ordersGET/orders{?from,to,limit,next}
Get all orders within a certain time frame.
- from
string
(required) Example: 2020-07-01The start date to look for orders. Format: YYYY-MM-DD
- to
string
(required) Example: 2020-07-02Date until which to look for orders. Format: YYYY-MM-DD
- limit
number
(optional) Default: 100 Example: 1Number of orders to return with a single call (max: 1000).
- next
string
(optional) Example: 9c783c753b7db667d9a5c96375514040A hash key for the next page of records. You can retrieve this key from the
next
value in the response of your first request.
Retrieve the orders of a single contact ¶
Headers
Content-Type: application/json
Body
{
"status": "success",
"results": [
{
"id": "WR-order-id",
"sourceId": "test-source-order-id",
"sourceSystem": "stripe",
"date": "2020-06-18T06:00:27.000Z",
"attributions": {
"firstClick": {
"date": "2020-06-18T02:00:27",
"source": "direct",
"medium": "direct",
"campaign": "direct",
"content": "direct",
"term": "direct"
},
"firstOptin": {
"date": "2020-06-18T02:00:27",
"source": "direct",
"medium": "direct",
"campaign": "direct",
"content": "direct",
"term": "direct"
},
"reOptin": {
"date": "2020-06-18T02:00:27",
"source": "direct",
"medium": "direct",
"campaign": "direct",
"content": "direct",
"term": "direct"
},
"lastClick": {
"date": "2020-06-18T02:00:27",
"source": "direct",
"medium": "direct",
"campaign": "direct",
"content": "direct",
"term": "direct"
}
},
"products": [
{
"id": "test-product-id",
"name": "Awesome Subscription Plan",
"qty": 1,
"PPU": 79
}
],
"payments": [
{
"date": "2020-06-18T02:00:27",
"status": "APPROVED",
"amount": 79
}
],
"amount": 79,
"currency": "USD",
"subscriptionId": "test-subscription-1234567",
"links": {
"contact": {
"href": "/contacts/AB-1234567"
},
"clicks": {
"href": "/contacts/AB-1234567/clicks"
}
}
}
],
"page": 1,
"totalPages": 1,
"total": 1,
"next": "9c783c753b7db667d9a5c96375514040"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"success",
"error"
]
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"sourceId": {
"type": "string"
},
"sourceSystem": {
"type": [
"string",
"null"
]
},
"date": {
"type": "string"
},
"attributions": {
"type": "object",
"properties": {
"firstClick": {
"type": "object",
"properties": {
"date": {
"type": "string",
"default": "null"
},
"source": {
"type": [
"string",
"null"
]
},
"medium": {
"type": [
"string",
"null"
]
},
"campaign": {
"type": [
"string",
"null"
]
},
"content": {
"type": [
"string",
"null"
]
},
"term": {
"type": [
"string",
"null"
]
}
}
},
"firstOptin": {
"type": "object",
"properties": {
"date": {
"type": "string",
"default": "null"
},
"source": {
"type": [
"string",
"null"
]
},
"medium": {
"type": [
"string",
"null"
]
},
"campaign": {
"type": [
"string",
"null"
]
},
"content": {
"type": [
"string",
"null"
]
},
"term": {
"type": [
"string",
"null"
]
}
}
},
"reOptin": {
"type": "object",
"properties": {
"date": {
"type": "string",
"default": "null"
},
"source": {
"type": [
"string",
"null"
]
},
"medium": {
"type": [
"string",
"null"
]
},
"campaign": {
"type": [
"string",
"null"
]
},
"content": {
"type": [
"string",
"null"
]
},
"term": {
"type": [
"string",
"null"
]
}
}
},
"lastClick": {
"type": "object",
"properties": {
"date": {
"type": "string",
"default": "null"
},
"source": {
"type": [
"string",
"null"
]
},
"medium": {
"type": [
"string",
"null"
]
},
"campaign": {
"type": [
"string",
"null"
]
},
"content": {
"type": [
"string",
"null"
]
},
"term": {
"type": [
"string",
"null"
]
}
}
}
}
},
"products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"qty": {
"type": "number"
},
"PPU": {
"type": "number"
}
}
}
},
"payments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"APPROVED",
"FAILED",
"REFUNDED",
"Partially Refunded",
"MANUAL"
]
},
"amount": {
"type": "number"
}
}
}
},
"amount": {
"type": "number"
},
"currency": {
"type": "string"
},
"subscriptionId": {
"type": "string"
},
"links": {
"type": "object",
"properties": {
"contact": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
},
"clicks": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
}
}
}
},
"required": [
"id",
"sourceId",
"date"
]
}
},
"page": {
"type": "number"
},
"totalPages": {
"type": "number"
},
"total": {
"type": "number"
},
"next": {
"type": "string"
}
}
}
Retrieve the orders of a single contactGET/contacts/{contactId}/orders{?from,to,limit,next}
You can use this endpoint to request the orders of a single contact. The response format will be
similar to the one when getting all of the orders except that it will contain only the ones belonging to the
contact id specified and won’t have information about the contact. If you need detailed information about the contact
whose orders you are requesting, please check the contacts/{contactId}
endpoint above.
You can look for the orders of a single contact using their id
, sourceId
or email
with this endpoint. Simply provide the value in the contactId
parameter. An example with the email would be: /orders/test@example.com
.
Note that when you request the orders of a specific contact, each order object won’t contain information about the contact as it is with the listing of all orders.
- contactId
string
(required) Example: AB-1234567The id of the contact whose orders you would like to receive.
- from
string
(required) Example: 2020-07-01The start date to look for orders. Format: YYYY-MM-DD
- to
string
(required) Example: 2020-07-02Date until which to look for orders. Format: YYYY-MM-DD
- limit
number
(optional) Default: 100 Example: 1Number of orders to return with a single call (max: 1000).
- next
string
(optional) Example: 9c783c753b7db667d9a5c96375514040A hash key for the next page of records. You can retrieve this key from the
next
value in the response of your first request.
Generated by aglio on 16 Nov 2020