Mirakl Marketplace APIs (latest-release)

Languages
Servers
URL to be replaced by your Mirakl instance URL
https://your-instance.mirakl.net/

Stores

Operations

Platform Settings

Operations

Invoicing and Accounting

Operations

Products

Operations

Messages

Operations

Offers

Operations

Orders

Operations

Export orders asynchronously

Request

The API returns a tracking id to be used to query API OR14.
Mirakl recommends to use API OR13 instead of API OR11 as it can handle very large volumes of data.
You must give at least one date range filter: created or last updated date.
API OR13 supports the chunk of the export file into multiple files in order to:

  • respect a maximum megabyte weight using the megabytes_per_chunk parameter.
  • respect a maximum amount of exported items using the items_per_chunk parameter.

Only one export request can be created for the same shop account.
Query
shop_idinteger(int64)

Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

localestring

<ISO-639>_<ISO-3166> ("en_US") or <ISO-639> ("en") locale for internationalized data translation. The APIs only accept locales that are equivalent to the languages activated in the back-office.

Bodyapplication/json
channel_codesArray of strings[ 0 .. 100 ] items

A list of channel codes

end_datestring(date-time)

End order creation date for filtering. Must be used with start_date.

end_update_datestring(date-time)

End order update date for filtering. Must be used with start_update_date.

fulfillment_center_codesstring[ 0 .. 100 ] characters

Code of the fulfillment center

items_per_chunkinteger(int64)[ 10000 .. 1000000 ]

Maximum number of items included in the generated files

Default 1000000
megabytes_per_chunkinteger(int64)[ 10 .. 1024 ]

Maximum mega bytes weight for generated files

Default 512
only_null_channelboolean

Return only orders without channel. If true, ignore the channel_codes

Default false
order_state_codesArray of strings[ 0 .. 100 ] items

A list of order state's codes

order_tax_modestring

Please note: If the taxes are not specified, the prices with mode TAX_EXCLUDED and with mode TAX_INCLUDED will return the same amounts.
Possible values:

  • TAX_EXCLUDED: the price fields (price, unit price, shipping price, cancellation amount, refund amount and order total prices) do not include taxes.
  • TAX_INCLUDED: the price fields include the tax amount.
  • If this query parameter is not specified, the default order tax mode of the platform is used.
  • start_datestring(date-time)

    Start order creation date for filtering. Must be used with end_date.

    start_update_datestring(date-time)

    Start order update date for filtering. Mirakl will subtract a time delta to ensure no orders are missed due to network and/or software latency. Must be used with end_update_date.

    curl -i -X POST \
      'https://your-instance.mirakl.net/api/orders/async-export?locale=string&shop_id=0' \
      -H 'Content-Type: application/json' \
      -d '{
        "channel_codes": [
          "string"
        ],
        "end_date": "2019-08-24T14:15:22Z",
        "end_update_date": "2019-08-24T14:15:22Z",
        "fulfillment_center_codes": "string",
        "items_per_chunk": 1000000,
        "megabytes_per_chunk": 512,
        "only_null_channel": false,
        "order_state_codes": [
          "string"
        ],
        "order_tax_mode": "string",
        "start_date": "2019-08-24T14:15:22Z",
        "start_update_date": "2019-08-24T14:15:22Z"
      }'

    Responses

    Asynchronous order export tracking creation success

    Bodyapplication/json
    tracking_idstring

    Id to poll in order to track the export's progress

    Response
    application/json
    { "tracking_id": "string" }

    Get the status of an asynchronous order export.

    Request

    Use this API to query the order export status after an API OR13 call.
    Until the export via API OR13 is complete, the status returned by API OR14 is PENDING.
    You must call API OR14 until you get the COMPLETED status which correspond to a completed and successful export from API OR13.
    The URLs in API OR14 response contain all the files from API OR13 export.
    Browse those urls and query them using the GET method.
    In case of error, the status is FAILED.
    In case of export canceled, the status is CANCELED.

    Path
    tracking_idstringrequired

    Id of the previously created asynchronous order export

    Query
    shop_idinteger(int64)

    Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

    curl -i -X GET \
      'https://your-instance.mirakl.net/api/orders/async-export/status/{tracking_id}?shop_id=0'

    Responses

    Order asynchronous export tracking polling success

    Bodyapplication/json
    last_updatedstring(date-time)

    The last updated date of the export

    statusstring

    Current status of the export, can be 'PENDING', 'FAILED', or 'COMPLETED'

    urlsArray of strings

    List of generated URLs to call to download each generated chunks

    Response
    application/json
    { "last_updated": "2019-08-24T14:15:22Z", "status": "string", "urls": [ "string" ] }

    Accept or refuse order lines

    Request

    Accept or refuse order lines in the WAITING_ACCEPTANCE status

    Path
    order_idstringrequired

    Order's identifier

    Query
    shop_idinteger(int64)

    Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

    Bodyapplication/json
    order_linesArray of objects(OR21_Request_OrderLines)

    List of representations of order line for acceptance

    curl -i -X PUT \
      'https://your-instance.mirakl.net/api/orders/{order_id}/accept?shop_id=0' \
      -H 'Content-Type: application/json' \
      -d '{
        "order_lines": [
          {
            "accepted": true,
            "id": "string"
          }
        ]
      }'

    Responses

    No Content

    Incidents

    Operations

    Picklists

    Operations

    Promotions

    Operations

    Returns

    Operations

    Multiple shipments

    Operations