Skip to content

Mirakl Connect Channel Platform APIs

General Notes

Backward compatibility information

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:

  • Your integration must allow for new fields to be added in API responses. From time to time, we add new fields as part of new features.
  • Do not expect fields to always have the same order in API calls. The order can change when fields are added to APIs.
  • Your integration must allow for new values to be added in enumeration fields. We can add new values in enumeration fields to support new features. We advise that you use strings to deserialize enumeration fields. Alternatively, you can configure your deserializer to accept unknown enumeration values.

Authentication with OAuth 2.0

Authentication is made via a token. To generate the token, you must have a client ID and a client secret provided by your Mirakl Partner team contact. Please contact them to receive your credentials. The token is a JSON Web Token (JWT) for use with an HTTP header. In the Authorization header use the Bearer schema. The content of the header must look like the following: Authorization: Bearer <token generated>

HTTPS only

All requests must use the HTTPS protocol.

API return codes

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.

Success 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.

Error Codes

  • 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.

Rate limits

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.

Request Content-Type

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.

Response Content-Type

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.

List of values as URL parameters

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.

UTF-8 encoding

Text data is encoded in UTF-8.

Locale

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.

Date formats

APIs can use different date formats (compliant with ISO 8601):

  • date-time with the pattern YYYY-MM-DDThh:mm:ss[.SSS]±hh:mm.
    • The offset +00:00 can be replaced by Z (the zero UTC offset).
    • All APIs provide date-times in UTC, with the trailing Z.
    • Milliseconds may be omitted if equals to .000.
  • date-time-without-timezone with the pattern YYYY-MM-DDThh:mm:ss[.SSS].
    • The timezone does not appear.
    • Milliseconds may be omitted if equals to .000.
  • time with the pattern hh:mm[:ss][.SSS]±hh:mm. Time only, with timezone
    • The offset +00:00 can be replaced by Z (the zero UTC offset).
    • Seconds may be omitted if equals to :00.
    • Milliseconds may be omitted if equals to .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 time
  • hh: 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 UTC

For GET requests, use URL encoding (for example, 2019-08-29T02:34:00+02:00 becomes 2019-08-29T02%3A34%3A00%2B02%3A00).

Seek pagination & sort

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:

  • criterion is the name of the criterion to sort by (e.g: date_created, title, ...)
  • direction is the sort direction. Can be one of ASC, DESC
Languages
Servers
Connect Channel Platform API

https://miraklconnect.com/api/channel-platform/

Operations
Operations

updateActionStatus - Update asynchronous action status

Request

Updates the final status of an asynchronous action previously initiated through a command event.

Overview

  • When an asynchronous action is requested via command event, an action_id is provided to track the action
  • Use this endpoint to report the final outcome (SUCCESS or FAILURE) of the action
  • For failed actions, detailed error information must be provided

Usage Notes

  • Update should be sent once the action is fully completed
  • Multiple errors can be provided for failed actions
  • The action ID must match the one provided in the original command event
Call Frequency
Maximum usage: Once per action completion
Security
Bearer
Path
action_idstringrequired

The unique identifier of the action. This ID was provided in the original command event that initiated the action.

Example: 1ba5fc4b-c4fd-4251-880b-3052e301bbd4
Bodyapplication/jsonrequired

The updated status and any error details for the action

errorsArray of objects

List of errors encountered during action processing. Required when status is FAILED. Multiple errors can be included to provide comprehensive failure details.

statusstringrequired

The final status of the asynchronous action:

  • SUCCESS - The action completed successfully with no errors
  • FAILED - The action encountered errors and could not be completed (requires error details in the errors array)
Enum"SUCCESS""FAILED"
curl -i -X PUT \
  https://miraklconnect.com/api/channel-platform/v1/orders/actions/1ba5fc4b-c4fd-4251-880b-3052e301bbd4 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": "SUCCESS",
    "errors": [
      {
        "code": "INVALID_INPUT",
        "message": "Cannot process cancellation: order is already shipped"
      }
    ]
  }'

Responses

The action status was successfully updated. No additional content is provided.

Response
No content

updateAnonymizeAfterDate - Update anonymization date for orders

Request

Updates the anonymization date for orders in the Mirakl Connect platform. Use this API to indicated after which date orders should be anonymized by Connect. The anonymization process is irreversible and should be used with caution.

Call Frequency
Maximum usage: Every time the anonymization date needs to be changed
Security
Bearer
Bodyapplication/jsonrequired

The new anonymize_after date for the orders

ordersArray of objects[ 1 .. 100 ] itemsrequired
curl -i -X PUT \
  https://miraklconnect.com/api/channel-platform/v1/orders/anonymize-after \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "orders": [
      {
        "channel_order_id": "COMMERCIAL_ID-A",
        "channel_id": 1234,
        "anonymize_after": "2023-10-01T00:00:00Z"
      }
    ]
  }'

Responses

Successfully updated the anonymize_after date for all orders of the request. No additional content is provided.

Response
No content

Request

Use this API to synchronize orders with Mirakl Connect. This API does not support PATCH operations. All fields must be sent with each upsert request to ensure the complete update of the order data.

Security
Bearer
Bodyapplication/jsonrequired
ordersArray of objects[ 1 .. 100 ] itemsrequired
originobjectrequired
curl -i -X POST \
  https://miraklconnect.com/api/channel-platform/v1/orders \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "origin": {
      "channel_id": "string",
      "channel_store_id": "string"
    },
    "orders": [
      {
        "channel_order_id": "string",
        "created_at": "2023-03-28T09:34:42Z",
        "channel_updated_at": "2023-03-28T09:34:42Z",
        "status": "AWAITING_ACCEPTANCE",
        "shipping_info": {
          "email": "string",
          "address": {
            "last_name": "string",
            "street": "string",
            "city": "string",
            "first_name": "string",
            "company": "string",
            "street_additional_info": "string",
            "state": "string",
            "country": "string",
            "country_iso_code": "string",
            "zip_code": "string",
            "phone": "string",
            "additional_info": "string"
          },
          "carrier": "string",
          "method": "string",
          "pudo_id": "string",
          "shipping_deadline": "2023-03-28T09:34:42Z",
          "delivery_date": {
            "earliest": "2023-03-28T09:34:42Z",
            "latest": "2023-03-28T09:34:42Z"
          }
        },
        "order_lines": [
          {
            "channel_order_line_id": "string",
            "created_at": "2023-03-28T09:34:42Z",
            "updated_at": "2023-03-28T09:34:42Z",
            "quantity": 0,
            "can_cancel": true,
            "can_refund": true,
            "total_shipping_price": {
              "amount": 0,
              "currency": "string"
            },
            "price": {
              "amount": 0,
              "currency": "string"
            },
            "product": {
              "id": "string",
              "title": "string",
              "thumbnail_url": "string"
            },
            "taxes": [
              {
                "amount": {
                  "amount": 0,
                  "currency": "string"
                },
                "code": "string",
                "rate": 0
              }
            ],
            "shipping_taxes": [
              {
                "amount": {
                  "amount": 0,
                  "currency": "string"
                },
                "code": "string",
                "rate": 0
              }
            ],
            "status": "AWAITING_ACCEPTANCE",
            "status_reason": "ACCEPTANCE_TIMEOUT",
            "adjustments": [
              {
                "channel_adjustment_id": "string",
                "reason": "CUSTOMER_CANCELATION",
                "created_at": "2023-03-28T09:34:42Z",
                "type": "REFUND",
                "quantity": 0,
                "price": {
                  "amount": 0,
                  "currency": "string"
                },
                "taxes": [
                  {
                    "amount": {
                      "amount": 0,
                      "currency": "string"
                    },
                    "code": "string",
                    "rate": 0
                  }
                ],
                "shipping_price": {
                  "amount": 0,
                  "currency": "string"
                },
                "shipping_taxes": [
                  {
                    "amount": {
                      "amount": 0,
                      "currency": "string"
                    },
                    "code": "string",
                    "rate": 0
                  }
                ]
              }
            ],
            "custom_attributes": [
              {
                "id": "string",
                "type": "STRING"
              }
            ]
          }
        ],
        "status_reason": "ACCEPTANCE_TIMEOUT",
        "fulfillment": {
          "type": "FULFILLED_BY_SELLER",
          "code": "string"
        },
        "billing_info": {
          "address": {
            "last_name": "string",
            "street": "string",
            "city": "string",
            "first_name": "string",
            "company": "string",
            "street_additional_info": "string",
            "state": "string",
            "country": "string",
            "country_iso_code": "string",
            "zip_code": "string",
            "phone": "string",
            "additional_info": "string"
          }
        },
        "has_incident": true,
        "custom_attributes": [
          {
            "id": "string",
            "type": "STRING"
          }
        ]
      }
    ]
  }'

Responses

No Content

Response
No content
Operations
Operations
Operations
Operations