Mirakl Platform for Services 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.

While most of our APIs support XML format, we strongly advise you to use JSON format, as our newest APIs are only available in JSON format.

Should you decide to validate our APIs output using XSD files, please note that your XSD should take into account the guidelines defined above. Mirakl does not provide XSD files for its APIs and does not offer support for writing XSD files.

Undocumented attributes

Some APIs may return more data than indicated in the documentation. Do not rely on this undocumented data, there is no guarantee about it.

Authentication

You can authenticate through API by sending your API key in a header.

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

Offset pagination & sort

Some APIs support offset pagination. In this case, you can use the max and offset parameters:

  • max: The max parameter is used to indicate the maximum number of items returned per page. This parameter is optional. The default value of this parameter is 10. The maximum value of this parameter is 100.
  • offset: The offset parameter is used to indicate the index of the first item (among all the results) in the returned page. This parameter is optional. The default value of this parameter is 0, which means that no offset is applied.

With pagination, the URL of the previous and/or next page can be returned in the header's attribute Link of the response.

When a sort parameter is available on such an API, it can be used to sort the results.

sort: The parameter sort is used to indicate how the results should be sorted. This parameter is optional. The possible values for this parameter are defined in resources. The default value of this parameter is defined in resources.

order: The parameter order is used to indicate the sort direction. This parameter is optional. The possible values ​​for this parameter are asc (default) or desc.

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
URL to be replaced by your Mirakl instance URL
https://your-instance.mirakl.net/

Platform Settings

Operations

Invoicing and Accounting

Operations

Stores

Operations

Services

Operations

SL01 - Create a location

Request

Call Frequency
Maximum usage: 30 per minute
Bodyapplication/json
contact_infoobject

Location contact information

descriptionstring[ 0 .. 2000 ] characters

Location description

geographyobjectrequired

Geographic information for this location

labelstring[ 3 .. 150 ] charactersrequired

Location label

opening_hoursobject

Location opening hours

shopobject

Shop which the location belong to. Leave it empty if you want to create an operator location.

curl -i -X POST \
  https://your-instance.mirakl.net/api/mms/locations \
  -H 'Content-Type: application/json' \
  -d '{
    "contact_info": {
      "email": "urna@elit.edu",
      "phone": "1-919-506-3035"
    },
    "description": "Open every day except on monday",
    "geography": {
      "address": {
        "formatted_address": "2466 White Ave, Chico, CA 95973, États-Unis"
      },
      "radius": 2000,
      "type": "CIRCLE"
    },
    "label": "2466 White Avenue",
    "opening_hours": {
      "friday": [
        {
          "closing_time": "12:00",
          "opening_time": "09:00"
        },
        {
          "closing_time": "18:00",
          "opening_time": "14:00"
        }
      ],
      "monday": [],
      "saturday": [
        {
          "closing_time": "12:00",
          "opening_time": "08:00"
        },
        {
          "closing_time": "19:00",
          "opening_time": "14:00"
        }
      ],
      "sunday": [
        {
          "closing_time": "12:00",
          "opening_time": "08:00"
        },
        {
          "closing_time": "18:00",
          "opening_time": "14:00"
        }
      ],
      "thursday": [
        {
          "closing_time": "12:00",
          "opening_time": "08:00"
        },
        {
          "closing_time": "18:00",
          "opening_time": "14:00"
        }
      ],
      "tuesday": [
        {
          "closing_time": "12:00",
          "opening_time": "09:00"
        },
        {
          "closing_time": "18:00",
          "opening_time": "14:00"
        }
      ],
      "wednesday": [
        {
          "closing_time": "12:00",
          "opening_time": "08:00"
        },
        {
          "closing_time": "19:00",
          "opening_time": "14:00"
        }
      ]
    },
    "shop": {
      "id": 152
    }
  }'

Responses

Created

Bodyapplication/json
contact_infoobject

Location contact information

descriptionstring

Location description

geographyobjectrequired

Geographic information for this location

idstringrequired

Location ID

labelstringrequired

Location label

mediasArray of objects

Medias associated to the location

opening_hoursobject

Location opening hours

shopobject

Shop details

shop_overridden_opening_hoursArray of objects

Overridden opening hours. Only available for an operator location

Response
application/json
{ "contact_info": { "email": "urna@elit.edu", "phone": "1-919-506-3035" }, "description": "Open every day except on monday", "geography": { "address": { … }, "center": { … }, "radius": 2000, "type": "CIRCLE" }, "id": "30ef2a4c-0ee1-4afe-ac0a-3ef30df43c70", "label": "2466 White Avenue", "opening_hours": { "friday": [ … ], "monday": [], "saturday": [ … ], "sunday": [ … ], "thursday": [ … ], "tuesday": [ … ], "wednesday": [ … ] } }

SL12 - List locations

Request

Call Frequency
Maximum usage:
- Asynchronous: every hour
- Synchronous: each time you need to create a service
Pagination

This resource supports seek pagination (see documentation)

Query
shopinteger(int64)

Shop id to include in result. (default: include all)

location_idArray of strings

Service Location IDs to include in result. (default: include all)

location_typestring

Service Location type to include in result. (default: include all)

Enum"AT_CUSTOMER_LOCATION""AT_SHOP_LOCATION"
curl -i -X GET \
  'https://your-instance.mirakl.net/api/mms/locations?location_id=string&location_type=AT_CUSTOMER_LOCATION&shop=0'

Responses

OK

Bodyapplication/json
dataArray of objectsrequired

Page of data

next_page_tokenstring

Token to access the next page. Absent if the current page is the last one.

previous_page_tokenstring

Token to access the previous page. Absent if the current page is the first one.

Response
application/json
{ "data": [ { … }, { … } ], "next_page_token": "bGltaXQ9MiZhZnRlcj04N2FjNGJkMi00OGQ2LTRhZmUtYTFiZi00YTgyYjY2M2FlZDQmc29ydD1sYWJlbCxBU0M=.CFpfMq4SqojszIok6kfjG9yjnHAjku5bbfX4AXqRC3s=" }

SL06 - Delete a location

Request

Call Frequency
Maximum usage: 60 per second
Path
location_idstringrequired

Id of the location to delete.

curl -i -X DELETE \
  'https://your-instance.mirakl.net/api/mms/locations/{location_id}'

Responses

No Content

SM11 - List service models

Request

Call Frequency
Maximum usage:
- Asynchronous: every hour
- Synchronous: at each faceting display
Read More
Pagination

This resource supports seek pagination (see documentation)

Sort fields
sort field can have the following values:
  • title - Sort by title (asc by default)
  • code (Default) - Sort by code (asc by default)
Query
category_codeArray of strings

Category codes to include in result. (default: include all)

model_codeArray of strings

Model codes to include in result. (default: include all)

location_typeArray of strings

Location types to include in result. (default: include all)

Items Enum"NO_LOCATION""AT_CUSTOMER_LOCATION""AT_SHOP_LOCATION"
booking_typeArray of strings

Booking types to include in result. (default: include all)

Items Enum"NO_BOOKING""DATETIME_REQUEST""SCHEDULED_EVENTS"
consumption_typeArray of strings

Consumption types to include in result. (default: include all)

Items Enum"VOUCHER""CONFIRMATION_BY_SHOP"
curl -i -X GET \
  'https://your-instance.mirakl.net/api/mms/models?booking_type=NO_BOOKING&category_code=string&consumption_type=VOUCHER&location_type=NO_LOCATION&model_code=string'

Responses

OK

Bodyapplication/json
dataArray of objectsrequired

Page of data

next_page_tokenstring

Token to access the next page. Absent if the current page is the last one.

previous_page_tokenstring

Token to access the previous page. Absent if the current page is the first one.

Response
application/json
{ "data": [ { … } ], "next_page_token": "bGltaXQ9MSZhZnRlcj1PVEhFUl9SRVBBSVImc29ydD1jb2RlLEFTQw==.FLjQC3Q1O1OGr6XXmWaZD0fwJgrv1fir6fi-i9sl8Cs=" }

SOF25 - Create a service

Request

Call Frequency
Maximum usage: 60 per minute
Bodyapplication/json
bookingobject

Service booking method. The type of the booking must reflect the associated Model's booking. By default, booking will be of type NO_BOOKING.

categoryobjectrequired

Service category

custom_attribute_valuesArray of objects

Service custom attributes values

date_availability_endstring(date-time)

Date when the service ends being available

date_availability_startstring(date-time)

Date when the service starts being available

descriptionstring[ 0 .. 2000 ] characters

Service description

inactive_reasonsArray of stringsunique

Reason why the service is inactive.

Items Value"MANUALLY_DISABLED"
locationobject

Service location method. The type of the location must reflect the associated Model's location. By default, location will be of type NO_LOCATION.

modelobjectrequired

Service model

pricingobjectrequired

Service pricing method

quantityobject

Service quantity method. By default, quantity will be of type NO_QUANTITY.

service_tax_codestring

Service tax code

shopobjectrequired

Shop which the service belong to

titlestring[ 3 .. 150 ] charactersrequired

Service title

curl -i -X POST \
  https://your-instance.mirakl.net/api/mms/services \
  -H 'Content-Type: application/json' \
  -d '{
    "booking": {
      "duration": "PT1H30M",
      "sessions": [
        {
          "available_units": 10,
          "time_slot": {
            "start": "2024-09-12T10:30:00Z"
          }
        },
        {
          "available_units": 20,
          "time_slot": {
            "start": "2024-09-20T10:30:00Z"
          }
        }
      ],
      "type": "SCHEDULED_EVENTS"
    },
    "category": {
      "code": "CHILDREN_ANIMATIONS"
    },
    "date_availability_start": "2023-07-20T00:00:00Z",
    "description": "Unleash laughter and joy with our unforgettable clown show! Experience side-splitting humor, mesmerizing tricks, and boundless energy. Perfect for all ages, it'\''s an entertainment extravaganza that will leave you smiling from start to finish. Join us for an incredible dose of fun and magical moments!",
    "inactive_reasons": [
      "MANUALLY_DISABLED"
    ],
    "location": {
      "shop_locations": [
        {
          "id": "e6fec1dc-0721-4ac8-9244-fefbfb44b951"
        }
      ],
      "type": "AT_SHOP_LOCATION"
    },
    "model": {
      "code": "CLOWN_SHOW"
    },
    "pricing": {
      "price_per_unit": 50,
      "type": "FIXED_PRICE"
    },
    "quantity": {
      "type": "NO_QUANTITY"
    },
    "service_tax_code": "SERVICE_TAX_CODE",
    "shop": {
      "id": 122
    },
    "title": "Jubilant Jesters: A Riot of Laughter with Our Whimsical Clown Show!"
  }'

Responses

Created

Bodyapplication/json
bookingobjectrequired

Service booking method

categoryobjectrequired

Service category

codestringrequired

Service code

consumptionobjectrequired

Service consumption method: how will the service be consumed ?

custom_attribute_valuesArray of objectsrequired

Service custom attributes values

date_availability_endstring(date-time)

Date when the service ends being available

date_availability_startstring(date-time)

Date when the service starts being available

date_createdstring(date-time)required

Service creation date

date_updatedstring(date-time)required

Service update date

descriptionstring

Service description

inactive_reasonsArray of stringsrequired

List of reasons why the service is inactive. If the service is active, this list is empty

Items Enum"MANUALLY_DISABLED""ZERO_QUANTITY""ORDER_REFUSED""ORDER_ACCEPTANCE_TIMEOUT""NOT_IN_AVAILABILITY_PERIOD""SHOP_NOT_OPEN""SHOP_SUSPENDED""SHOP_CURRENCY_DISABLED""MISSING_REQUIRED_FIELDS""VALIDATION_NEEDED"
locationobjectrequired

Service location method: where the service will be provided ?

mediasArray of objects

All the medias associated to a service

modelobjectrequired

Service model

pricingobjectrequired

Service pricing method

quantityobjectrequired

Service quantity method

service_tax_codestring

Service tax code

shopobjectrequired

Shop which creates the service

titlestringrequired

Service title

Response
application/json
{ "booking": { "duration": "PT1H", "type": "DATETIME_REQUEST" }, "category": { "code": "YOGA_CLASSES", "label": "Yoga classes" }, "code": "PERSONALIZED_YOGA_OASIS", "consumption": { "type": "VOUCHER" }, "custom_attribute_values": [ { … } ], "date_availability_start": "2023-07-20T00:00:00Z", "date_created": "2023-07-18T13:52:37Z", "date_updated": "2023-07-18T13:52:37Z", "description": "Elevate your yoga practice with private classes at home. Experience personalized instruction tailored to your needs and goals. Enjoy the convenience and focused attention as you find balance and inner peace in the comfort of your own space. Transform your well-being with our exceptional private yoga classes.", "inactive_reasons": [ "MANUALLY_DISABLED" ], "location": { "shop_locations": [ … ], "type": "AT_CUSTOMER_LOCATION" }, "model": { "code": "PRIVATE_YOGA_LESSON", "title": "Private yoga lesson" }, "pricing": { "max_price_per_unit": 80, "min_price_per_unit": 50, "price_per_unit_options": [ … ], "type": "FIXED_PRICE_MULTI" }, "quantity": { "type": "NO_QUANTITY" }, "shop": { "currency_code": "EUR", "id": 122, "name": "Yoga club" }, "title": "Personalized Yoga Oasis: Elevate Your Practice with Private Classes at Home" }

SOF26 - Update a service

Request

Call Frequency
Maximum usage: 60 per minute
Path
service_codestringrequired

Code of the service to update.

Bodyapplication/json
bookingobject

Service booking method. The booking type must be equal to the booking type in the Model configuration.

categoryobject

Service category

custom_attribute_valuesArray of objects

Service custom attributes values

date_availability_endstring(date-time)

Date when the service ends being available. Set value to null to remove the date.

date_availability_startstring(date-time)

Date when the service starts being available. Set value to null to remove the date.

descriptionstring<= 2000 characters

Service description. Set value to null to remove the description.

inactive_reasonsArray of strings[ 0 .. 1 ] items

Reason why the service is inactive. If equals to [] or null, then remove all reasons that are manually removable.

Items Value"MANUALLY_DISABLED"
locationobject

Service location method. The location type must be equal to the location type in the Model configuration.

modelobject

Service model

pricingobject

Service pricing method

quantityobject

Service quantity method.

service_tax_codestring

Service tax code

shopobjectrequired

Shop which the service belong to

titlestring[ 3 .. 150 ] characters

Service title

curl -i -X PUT \
  'https://your-instance.mirakl.net/api/mms/services/{service_code}' \
  -H 'Content-Type: application/json' \
  -d '{
    "booking": {
      "duration": "PT1H30M",
      "sessions": [
        {
          "available_units": 10,
          "id": "208d4dd0-0c1d-4ca5-9083-d51b972be6c1",
          "time_slot": {
            "start": "2024-09-12T10:30:00Z"
          }
        },
        {
          "available_units": 20,
          "time_slot": {
            "start": "2024-09-20T10:30:00Z"
          }
        }
      ],
      "type": "SCHEDULED_EVENTS"
    },
    "shop": {
      "id": 122
    }
  }'

Responses

OK

Bodyapplication/json
bookingobjectrequired

Service booking method

categoryobjectrequired

Service category

codestringrequired

Service code

consumptionobjectrequired

Service consumption method: how will the service be consumed ?

custom_attribute_valuesArray of objectsrequired

Service custom attributes values

date_availability_endstring(date-time)

Date when the service ends being available

date_availability_startstring(date-time)

Date when the service starts being available

date_createdstring(date-time)required

Service creation date

date_updatedstring(date-time)required

Service update date

descriptionstring

Service description

inactive_reasonsArray of stringsrequired

List of reasons why the service is inactive. If the service is active, this list is empty

Items Enum"MANUALLY_DISABLED""ZERO_QUANTITY""ORDER_REFUSED""ORDER_ACCEPTANCE_TIMEOUT""NOT_IN_AVAILABILITY_PERIOD""SHOP_NOT_OPEN""SHOP_SUSPENDED""SHOP_CURRENCY_DISABLED""MISSING_REQUIRED_FIELDS""VALIDATION_NEEDED"
locationobjectrequired

Service location method: where the service will be provided ?

mediasArray of objects

All the medias associated to a service

modelobjectrequired

Service model

pricingobjectrequired

Service pricing method

quantityobjectrequired

Service quantity method

service_tax_codestring

Service tax code

shopobjectrequired

Shop which creates the service

titlestringrequired

Service title

Response
application/json
{ "booking": { "type": "NO_BOOKING" }, "category": { "code": "MEALS_AND_DINNERS", "label": "Meals & Dinners" }, "code": "UEVT44VJXD", "consumption": { "type": "VOUCHER" }, "custom_attribute_values": [ { … }, { … }, { … } ], "date_availability_start": "2017-03-15T10:15:00Z", "date_created": "2017-03-29T13:52:37Z", "date_updated": "2017-03-29T13:52:37Z", "description": "You will be served a glass of Ruinart Brut champagne, a gastronomic four course dinner, four accompanying wines and coffee service with sweet delicacies.", "inactive_reasons": [ "MANUALLY_DISABLED" ], "location": { "shop_locations": [ … ], "type": "AT_SHOP_LOCATION" }, "medias": [ { … } ], "model": { "code": "FOOD", "title": "All services related to food" }, "pricing": { "max_price_per_unit": 202.6, "min_price_per_unit": 77, "options": [ … ], "price_per_unit": 77, "type": "FIXED_PRICE" }, "quantity": { "available": 12, "max_per_order": 1, "type": "LIMITED" }, "shop": { "currency_code": "EUR", "id": 122, "name": "Advansed Teksyztems" }, "title": "Alliance Royal Package Diner" }

SOF27 - Delete a service

Request

Call Frequency
Maximum usage: 30 per minute
Path
service_codestringrequired

Code of the service to delete.

curl -i -X DELETE \
  'https://your-instance.mirakl.net/api/mms/services/{service_code}'

Responses

No Content

Messages

Operations

Orders

Operations