Marketplace Orders API
- Overview
- Marketplace orders vs standard orders
- List of endpoints
- Error codes
- Retrieve marketplace orders
1. Overview
The Marketplace Orders API provides access to orders that originate from external marketplace platforms — specifically Etsy and Amazon — that are integrated with your Zakeke account.
When a customer places an order on one of these platforms, Zakeke automatically imports it and tracks it as a marketplace order. This is a distinct concept from a standard Zakeke order: a marketplace order represents the original transaction as received from the external platform, and acts as a pending entry waiting for the customer to complete their product customizations.
This API allows you to retrieve and filter marketplace orders, monitor their status, and correlate them with the corresponding Zakeke orders once all customizations have been completed.
2. Marketplace orders vs standard orders
Understanding the difference between marketplace orders and standard Zakeke orders is essential to correctly interpret the data returned by this API.
How the lifecycle works
When a customer buys a customizable product on an integrated marketplace:
- Zakeke imports the transaction from the external platform (Etsy or Amazon) and creates a marketplace order. At this stage, the
orderIDfield isnull— the order exists in Zakeke but no Zakeke order has been created yet. - The customer completes their designs: each line item in the marketplace order requires the customer to finalize their product customization. The order remains in a pending or incomplete state until all line items have been designed.
- A standard Zakeke order is created once all designs across all line items are complete. From this point on, the
orderIDfield on the marketplace order is populated with the identifier of the corresponding Zakeke order.
Key differences
| Marketplace Order | Standard Order | |
|---|---|---|
| Origin | Imported from an external platform (Etsy or Amazon) | Created directly on Zakeke |
| Code | The original order code/number from the marketplace | A Zakeke-generated identifier |
| API | Marketplace Orders API (this document) | Orders API |
| Status | Tracks whether the customer has completed all designs (New, Incomplete, Complete, Canceled, Blocked) | Tracks the print production lifecycle |
| Relationship | Has an orderID field pointing to the linked Zakeke order, once all designs are complete | Independent of marketplace orders |
When to use each API
- Use the Marketplace Orders API to monitor incoming orders from Etsy and Amazon, check whether customers have completed their customizations, and retrieve the original marketplace data (code, order number, customer email).
- Use the Orders API to retrieve the customization and print-ready file details once all designs are complete and a Zakeke order has been created.
Once all designs in a marketplace order are complete, its orderID field will contain the Zakeke order ID. You can use that value to call the Orders API and retrieve the full print production details for that order.
3. List of endpoints
The following are the endpoints available for the Marketplace Orders API.
All the endpoints have the following base url: https://api.zakeke.com/
All API calls need to be authenticated and authorized via an S2S-type oAuth token. For all the details see the Authentication and Authorization section.
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/marketplaceorders | Retrieve a paginated list of marketplace orders for the authenticated seller, with optional filtering. |
In the following sections we will provide details of each endpoint with a description of the information they provide and the operations they follow.
4. Error codes
In RESTful API calls, such as those made to Zakeke, HTTP status codes are crucial for indicating the outcome of API requests. Codes in the 2xx range signify successful operations, 4xx errors denote client-side issues, and 5xx errors indicate server-side problems. This system allows developers to quickly identify and address issues with API interactions, enhancing the efficiency of integrating with Zakeke's services.
For certain status codes, Zakeke includes an error message in the response body to elucidate the cause of the error. This is particularly useful when a single status code, like 404 Not Found or 400 Bad Request, could indicate various issues. These messages help developers pinpoint the specific problem, facilitating a more efficient troubleshooting process when integrating with Zakeke's APIs.
5. Retrieve marketplace orders
This endpoint returns a paginated list of marketplace orders for the authenticated seller, from newest to oldest.
Request
GET https://api.zakeke.com/v1/marketplaceorders
The following parameters can be specified in the query string to paginate and filter the results:
Use pagination parameters and an optimal page size (maximum 100 items per page) to maintain good performance when running the API.
| Parameter | Data type | Required | Description |
|---|---|---|---|
| pageSize | integer | No | Number of items per page. Default: 15. Maximum: 100. |
| pageNumber | integer | No | The page number to return, 1-based. Default: 1. |
| searchFor | string | No | Free-text search across order code, order number, and tags. |
| salesChannelID | integer | No | Filter by a specific sales channel (marketplace). Use the id returned in the salesChannel object. |
| status | string | No | Filter by order status. See the status values table below. |
| dateFrom | string | No | Return only orders placed on or after this date. Format: yyyy-MM-dd. |
| dateTo | string | No | Return only orders placed on or before this date. Format: yyyy-MM-dd. |
The status parameter accepts the following values (case-insensitive):
| Value | Description |
|---|---|
New | The order has just been imported from the marketplace. No designs have been completed yet. |
Incomplete | The customer has completed some designs, but at least one line item is still pending. |
Complete | All line items have been designed by the customer. A Zakeke order has been created. |
Canceled | The order has been canceled. |
Blocked | The order has been manually blocked and requires intervention before it can proceed. |
Response
The API call returns a JSON array with the following structure:
[
{
"id": 0,
"orderID": 0,
"code": "string",
"orderNumber": "string",
"salesChannel": {
"id": 0,
"url": "string",
"platform": "string"
},
"status": "string",
"email": "string",
"orderDate": "string",
"tags": ["string"]
}
]
Each item in the array represents a marketplace order whose properties have the following meaning:
| Property | Data type | Description |
|---|---|---|
| id | integer | Unique identifier generated by Zakeke for the marketplace order. |
| orderID | integer | null | Identifier of the corresponding Zakeke order, once the marketplace order has been processed. null if not yet processed. |
| code | string | The order code as received from the marketplace. |
| orderNumber | string | The merchant-visible order number assigned by the marketplace. |
| salesChannel | object | The sales channel (marketplace) where the order was placed. |
| status | string | The current processing status of the marketplace order. See the status values table above. |
string | null | The customer's email address. null if the order has been redacted for privacy compliance. | |
| orderDate | string | Date and time the order was placed on the marketplace, in ISO 8601 format. |
| tags | array | null | List of tags associated with the order, if any. |
The salesChannel object has the following structure:
{
"id": 0,
"url": "https://...",
"platform": "string"
}
| Property | Data type | Description |
|---|---|---|
| id | integer | Numeric code that uniquely identifies the sales channel within Zakeke. |
| url | string | URL of the marketplace store. |
| platform | string | The ecommerce platform for the sales channel (e.g. Etsy, Amazon, Manual Order). |
The response also includes the following custom headers:
| Header | Data type | Description |
|---|---|---|
| X-Total-Count | integer | The total number of orders matching the filters. |
| X-Has-More-Pages | boolean | Whether there is another page after the current one. |
HTTP Response Codes
| Code | Name | Description |
|---|---|---|
| 200 | OK | API call completed successfully. The response body contains the marketplace order list. |
| 400 | Bad Request | Invalid parameter value (e.g. unrecognized status string). |
| 401 | Unauthorized | Unauthorized user. Check the token used for the call. |
| 403 | Forbidden | Unauthenticated user. Check the token used for the call. |
Examples
Example 1 — Get the first 15 marketplace orders.
curl -X GET "https://api.zakeke.com/v1/marketplaceorders?pageSize=15&pageNumber=1" \
-H "Accept: application/json" \
-H "Authorization: Bearer <Access-Token>"
The response will include the first 15 marketplace orders and the following custom headers:
X-Total-Count: "143"
X-Has-More-Pages: "true"
Example 2 — Get all completed orders placed in January 2024.
curl -X GET "https://api.zakeke.com/v1/marketplaceorders?status=Complete&dateFrom=2024-01-01&dateTo=2024-01-31" \
-H "Accept: application/json" \
-H "Authorization: Bearer <Access-Token>"
Example 3 — Search for a specific order by order number.
curl -X GET "https://api.zakeke.com/v1/marketplaceorders?searchFor=1234-ETSY" \
-H "Accept: application/json" \
-H "Authorization: Bearer <Access-Token>"
Example 4 — Get new orders for a specific marketplace channel.
curl -X GET "https://api.zakeke.com/v1/marketplaceorders?status=New&salesChannelID=42" \
-H "Accept: application/json" \
-H "Authorization: Bearer <Access-Token>"