Mirakl solutions are updated through continuous delivery to provide new features, security fixes and bug fixes.
New deployed versions are backward compatible, which guarantees the durability of your integration after a Mirakl solution update, on condition that your integration follows these guidelines:
You must authenticate with Mirakl Authentication System to make API calls. Refer to the Mirakl documentation: About the Mirakl Authentication System.
All requests must use the HTTPS protocol.
Mirakl API uses standard HTTP return codes.
When making HTTP requests, you can check the success or failure status of your request by using the HTTP Status Codes (i.e. 200
). You must not use the HTTP Status Messages or Reason-Phrases (i.e. OK
), as they are optional and may not be returned in HTTP responses (see RFC9110 for more information).
Our API documentation does not document Reason-Phrases but provides a short contextualized description of HTTP Status Codes.
200
: OK - Request succeeded.201
: Created - Request succeeded and resource created.202
: Accepted - Request accepted for processing.204
: No Content - Request succeeded but does not return any content.400
: Bad Request - Parameter errors or bad method usage. Bad usage of the resource. For example: a required parameter is missing, some parameters use an incorrect format, a data query is not in the expected state.401
: Unauthorized - API call without authentication. Add authentication information or use a valid authentication token.403
: Forbidden - Access to the resource is denied. Current user can not access the resource.404
: Not Found - The resource does not exist. The resource URI or the requested resource do not exist for the current user.405
: Method Not Allowed - The HTTP method (GET, POST, PUT, DELETE) is not allowed for this resource. Refer to the documentation for the list of accepted methods.406
: Not Acceptable - The requested response content type is not available for this resource. Refer to the documentation for the list of correct values of the Accept header for this request.410
: Gone - The resource is permanently gone. The requested resource is no longer available and will not be available again.415
: Unsupported Media Type - The entity content type sent to the server is not supported. Refer to the documentation for the list of correct values of the Content-type header to send data.429
: Too many requests - Rate limits are exceeded. The user has sent too many requests in the last hour. Refer to the documentation for the maximum calls count per hour.500
: Internal Server Error - The server encountered an unexpected error.Mirakl APIs are protected by rate limits. Each API has a dedicated section displaying its rate limit.
If you make too many calls, you might receive an HTTP 429
"Too Many Requests" error. The response will contain a Retry-After
header that specifies the number of seconds to wait before making a new request.
If an API request supports multiple Content-Types, add a Content-Type
header to select the format to use in the request. The API documentation lists the formats an API can consume.
If an API response supports multiple Content-Types, add an Accept
header to select the format accepted in the response. The API documentation lists the formats an API can produce.
array type fields indicate a list of values as URL parameters. You can add more parameter=value
elements to the URL. Refer to the example in the right panel.
Text data is encoded in UTF-8.
If the API returns internationalized data, you can specify the locale
parameter.
The Locale format is usually <ISO-639>_<ISO-3166>
(e.g. "en_US"). There are some exceptions where the Locale format can be <ISO-639>
(e.g. "en"). The locale returned in a response uses this format.
The APIs only accept locales that are equivalent to the languages activated in the back-office.
APIs can use different date formats (compliant with ISO 8601):
YYYY-MM-DDThh:mm:ss[.SSS]±hh:mm
.+00:00
can be replaced by Z
(the zero UTC offset).Z
..000
.YYYY-MM-DDThh:mm:ss[.SSS]
..000
.hh:mm[:ss][.SSS]±hh:mm
. Time only, with timezoneZ
(the zero UTC offset).:00
..000
.In the patterns:
YYYY
: years (four-digit)MM
: months, 01-12 (two-digit)DD
: days, 01-31 (two-digit)T
is a delimiter between the date and timehh
: hours, 00-23 (two-digit)mm
: minutes, 00-59 (two-digit)ss
: seconds, 00-60 (two-digit)SSS
: milliseconds, 000-999 (three-digit)±hh:mm
: refers to an offset from UTCFor GET requests, use URL encoding (for example, 2019-08-29T02:34:00+02:00
becomes 2019-08-29T02%3A34%3A00%2B02%3A00
).
For better performance and user experience, some APIs support "seek" pagination. This means that you cannot go directly to the N-th page.
Use the optional limit
query parameter to indicate the maximum number of items returned per page. The default value is 10. The maximum value is 100.
If there are more results to return, the response contains a next_page_token
field. Pass this value in the page_token
query parameter to return the next page of results.
The API also returns a previous_page_token
when the result is not the first page. Use it the same way as next_page_token
.
Values of next_page_token
and previous_page_token
contain all required parameters to access next and previous page. When using the page_token
parameter all other parameters are ignored, regardless of the value given to page_token
.
When a sort
parameter is available, it must follow the sort=criterion,direction
format where:
ASC
, DESC
https://miraklconnect.com/api/
https://miraklconnect.com/api/v2/orders/{order_id}/accept
curl -i -X PUT \
https://miraklconnect.com/api/v2/orders/0024_COMMERCIAL_ID-A/accept \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"order_lines": [
{
"accepted": true,
"id": "0002_3202630-A-1"
},
{
"accepted": false,
"id": "0002_3202630-A-2"
}
]
}'
Accepted. The accept request will be processed asynchronously.
The unique identifier for the asynchronous action. It should be used with the v2-getStatus API to retrieve current action status and potential errors.
{ "action_id": "1ba5fc4b-c4fd-4251-880b-3052e301bbd4", "tracking_id": "1ba5fc4b-c4fd-4251-880b-3052e301bbd4" }
https://miraklconnect.com/api/v2/orders/{order_id}/cancel
curl -i -X POST \
https://miraklconnect.com/api/v2/orders/0024_COMMERCIAL_ID-A/cancel \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"cancelations": [
{
"order_line_id": "0002_3202630-A-1",
"price": {
"amount": 15,
"currency": "USD"
},
"product_id": "10000",
"quantity": 1,
"reason": "CUSTOMER_CANCELATION",
"shipping_price": {
"amount": 8,
"currency": "USD"
},
"shipping_taxes": [
{
"amount": {
"amount": 3,
"currency": "USD"
},
"code": "ShippingTax1"
},
{
"amount": {
"amount": 4,
"currency": "USD"
},
"code": "ShippingTax2"
}
],
"taxes": [
{
"amount": {
"amount": 1,
"currency": "USD"
},
"code": "Tax1"
},
{
"amount": {
"amount": 2,
"currency": "USD"
},
"code": "Tax2"
}
]
}
]
}'
Accepted. The cancel request will be processed asynchronously.
The unique identifier for the asynchronous action. It should be used with the v2-getStatus API to retrieve current action status and potential errors.
{ "action_id": "1ba5fc4b-c4fd-4251-880b-3052e301bbd4", "tracking_id": "1ba5fc4b-c4fd-4251-880b-3052e301bbd4" }
Use this API to check the status of an asynchronous action request (e.g., v2-acceptOrderLines
) and retrieve any potential errors that occurred during the action processing. We recommend integrating this API asynchronously.
https://miraklconnect.com/api/v2/orders/actions/{action_id}
curl -i -X GET \
https://miraklconnect.com/api/v2/orders/actions/1ba5fc4b-c4fd-4251-880b-3052e301bbd4 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
Details of the action, including current status and potential errors
List of errors that occurred during the action processing
The unique identifier for the asynchronous action. This ID is generated when the action is initially requested.
{ "created_at": "2021-11-30T18:35:24Z", "id": "1ba5fc4b-c4fd-4251-880b-3052e301bbd4", "status": "SUCCESS", "updated_at": "2021-11-30T18:38:24Z" }
Use this API to synchronize Mirakl Connect orders with your system. We recommend integrating this API in asynchronous mode. You can retrieve all orders updated since the last call, and update your referential accordingly. To do so, schedule a task that calls this API using the updated_from
parameter valued with the last execution time of the task.
This resource supports seek pagination (see documentation)
sort
field can have the following values:https://miraklconnect.com/api/v2/orders
curl -i -X GET \
'https://miraklconnect.com/api/v2/orders?fulfillment_type=FULFILLED_BY_SELLER&limit=10&order_ids=string&page_token=string&statuses=AWAITING_FRAUD_CHECK&updated_from=2021-01-01T08%3A30%3A00Z' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
{ "data": [ { … }, { … } ], "next_page_token": "bGltaXQ9MTAmYWZ0ZXI9MjAyMS0xMS0xNlQxNjoxNTowOSswMTowMCZhZnRlcj1jb25uZWN0bXAxLXRlc3QmYWZ0ZXI9MzE3ODczOC1BJnNvcnQ9ZGF0ZV91cGRhdGVkLERFU0M=", "previous_page_token": "YmVmb3JlPTIwMjEtMTEtMjRUMDA6MDA6MTErMDE6MDAmYmVmb3JlPWNvbm5lY3RtcDItdGVzdCZiZWZvcmU9MzIwMjYzMC1BJmxpbWl0PTEwJnNvcnQ9ZGF0ZV91cGRhdGVkLERFU0M=" }
https://miraklconnect.com/api/v2/orders/{order_id}/refund
curl -i -X POST \
https://miraklconnect.com/api/v2/orders/0024_COMMERCIAL_ID-A/refund \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"refunds": [
{
"order_line_id": "0002_3202630-A-1",
"price": {
"amount": 15,
"currency": "USD"
},
"product_id": "10000",
"quantity": 1,
"reason": "ITEM_NOT_RECEIVED",
"shipping_price": {
"amount": 8,
"currency": "USD"
},
"shipping_taxes": [
{
"amount": {
"amount": 3,
"currency": "USD"
},
"code": "ShippingTax1"
},
{
"amount": {
"amount": 4,
"currency": "USD"
},
"code": "ShippingTax2"
}
],
"taxes": [
{
"amount": {
"amount": 1,
"currency": "USD"
},
"code": "Tax1"
},
{
"amount": {
"amount": 2,
"currency": "USD"
},
"code": "Tax2"
}
]
}
]
}'
Accepted. The refund request will be processed asynchronously.
The unique identifier for the asynchronous action. It should be used with the v2-getStatus API to retrieve current action status and potential errors.
{ "action_id": "1ba5fc4b-c4fd-4251-880b-3052e301bbd4", "tracking_id": "1ba5fc4b-c4fd-4251-880b-3052e301bbd4" }
Use this API to accept or refuse order lines that are in the AWAITING_ACCEPTANCE
status, from Mirakl Connect. The API also synchronizes the order line status on the sales channel. We recommend integrating this API in synchronous mode.
https://miraklconnect.com/api/orders/{order_id}/accept
curl -i -X PUT \
https://miraklconnect.com/api/orders/0024_COMMERCIAL_ID-A/accept \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"order_lines": [
{
"accepted": true,
"id": "0002_3202630-A-1"
},
{
"accepted": false,
"id": "0002_3202630-A-2"
}
]
}'
Use this API to synchronize Mirakl Connect orders with your system. We recommend integrating this API in asynchronous mode. You can retrieve all orders updated since the last call, and update your referential accordingly. To do so, schedule a task that calls this API using the updated_from
parameter valued with the last execution time of the task.
This resource supports seek pagination (see documentation)
sort
field can have the following values:https://miraklconnect.com/api/orders
curl -i -X GET \
'https://miraklconnect.com/api/orders?fulfillment_type=FULFILLED_BY_SELLER&limit=10&order_ids=string&page_token=string&statuses=AWAITING_FRAUD_CHECK&updated_from=2021-01-01T08%3A30%3A00Z' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
{ "data": [ { … }, { … } ], "next_page_token": "bGltaXQ9MTAmYWZ0ZXI9MjAyMS0xMS0xNlQxNjoxNTowOSswMTowMCZhZnRlcj1jb25uZWN0bXAxLXRlc3QmYWZ0ZXI9MzE3ODczOC1BJnNvcnQ9ZGF0ZV91cGRhdGVkLERFU0M=", "previous_page_token": "YmVmb3JlPTIwMjEtMTEtMjRUMDA6MDA6MTErMDE6MDAmYmVmb3JlPWNvbm5lY3RtcDItdGVzdCZiZWZvcmU9MzIwMjYzMC1BJmxpbWl0PTEwJnNvcnQ9ZGF0ZV91cGRhdGVkLERFU0M=" }
https://miraklconnect.com/api/v2/orders/tracking/{tracking_id}
curl -i -X GET \
https://miraklconnect.com/api/v2/orders/tracking/1ba5fc4b-c4fd-4251-880b-3052e301bbd4 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
{ "created_at": "2021-11-30T18:35:24Z", "id": "1ba5fc4b-c4fd-4251-880b-3052e301bbd4", "status": "SUCCESS", "updated_at": "2021-11-30T18:38:24Z" }