GET /orders

⚠ Attention

We do not recommend calls to this endpoint without proper filtering, especially loading of already closed orders, to not exceed your daily API limit for orders.

When calling this endpoint, orders with blocked status are not included in the response, unless you are specifically filtering this status.

Filtering

Show

You can filter the results by any field from the results set.

E.g. /orders?customer_id=12345 will return only results with customer_id = 12345

To filter for boolean values, true, false, 1 or 0 are supported

E.g. /orders?mdp=true will return all mdp orders

To filter for date-time and date values use YYYY-MM-DD HH24:MI:SS and YYYY-MM-DD formats respectively (HH24 means 24 hour format)

E.g. /orders?ship_date=2017-01-14 will return all orders shipped 2017-01-14

You may specify a modifier to filters (default is eq) | Modifier | Meaning | |--------------|-----------------------------------| | eq | equal (default) | | neq | not equal | | gt | greater than | | ge | greater or equal | | lt | less than | | le | less or equal | | in | in values | | nin | not in values | | bt | between two values | | nbt | not between two values |

Usage of filter modifiers

E.g. /orders?customer_id=in:1234,12345 will return only results with customer_id equal to 1234 and 12345

You may use a special value $null with eq and neq modifiers for nullable fields, where comparing to empty string would not work.

E.g. /orders?shipped=neq:$null will return all orders with shipped set to any non-null value

Sorting

Show

You can sort results using sort parameter

E.g. /orders?_sort=id

You may specify sorting modifiers (default is asc) | Modifier | Meaning | |--------------|---------------------| | asc | ascending (default) | | desc | descending | E.g. /orders?_sort=customer_id:asc,id:desc

Basic data

Show

When filtering orders with specific status, by default, only order ids are returned.

With URL parameter filter=basic objects with basic data are returned instead.

Example

  {
    "result": {
    "code": 200,
      "status": "OK"
    },
    "paging": {
    "pages": 1,
      "size": 1,
      "page": 1
    },
    "data": [
      {
        "id": 89591350,
        "external_id": "24bcb8fe-13d8-11ed-861d-0242ac120002", 
        "purchase_id": 89591351,
        "cod": 25,
        "ship_date": "2017-01-14",
        "delivered_at": "2018-01-14 08:13:00",
        "status": "open",
        "confirmed": true,
        "test": false,
        "mdp": false,
        "customer_id": 1111111111,
        "customer": "John Doe"
      }
    ]
  }

Headers

  • X-Application-Name string

Query parameters

  • client_id string Required

    Client identifier

  • filter string

    With URL parameter filter=basic objects with basic data are returned instead of list of ids.

    Value is basic.

  • test integer

    Set to 1 to get all orders including test orders

    Values are 0 or 1. Default value is 0.

Responses

  • 200

    OK

    Hide response attributes Show response attributes object
    • data array[object]
      Hide data attributes Show data attributes array[object]
      • customer_id number Required

        Mall customer ID

      • customer string Required

        Name and surname of the customer

      • id integer Required

        Order ID

      • source string | null Required

        Order Source

      • external_id string | null Required

        External ID

      • purchase_id integer Required

        MALL internal purchase ID

      • cod number Required

        Price of COD (cash on delivery), double

      • ship_date string Required

        Expected date of shipment

      • delivered_at string

        Date when order has been delivered to customer

      • status string Required

        Description of statuses:

        • blocked - order is blocked and cannot be processed by partner yet
        • open - order is open (paid successfully or uses cash on delivery) and ready for shipment by partner
        • shipping - order is in shipment process
        • shipped - order is being shipped to the customer and cannot be cancelled
        • delivered - final status, order was delivered to the customer
        • returned - final status, order was returned as undelivered and is not invoiced
        • cancelled - final status, order was cancelled and is not invoiced
        • lost - final status, order was lost during delivery (only for orders shipped with MDP, status is managed by MALL)

        Values are blocked, open, shipping, shipped, delivered, returned, cancelled, or lost.

      • confirmed boolean Required

        Information if the order is confirmed by partner or not

      • test boolean

        True means the order is only testing, false means production orders

      • mdp boolean

        Whether order uses MDP (Mall delivery platform), either Classic or Spectrum

      • mdp_classic boolean

        Whether order uses MDP (Mall delivery platform) Classic

      • mdp_spectrum boolean

        Whether order uses MDP (Mall delivery platform) Spectrum

      • shipped string

        last date of change order to status shipped

      • shipping string

        last date of change order to status shipping

      • open string

        last date of change order to status open

      • blocked string

        last date of change order to status blocked

      • lost string

        last date of change order to status lost

      • returned string

        last date of change order to status returned

      • cancelled string

        last date of change order to status cancelled

      • delivered string

        last date of change order to status delivered

    • result object
      Hide result attributes Show result attributes object
      • code integer(int)
      • status string
    • paging object
      Hide paging attributes Show paging attributes object
      • pages integer
      • size integer
      • page integer
GET /orders
curl \
 -X GET https://mpapi.proxy.omnicado.com/v1/orders?client_id=yourClientId&client_id=api_token_value \
 -H "X-Application-Name: myApplicationName"
Response examples (200)
{
  "data": [
    {
      "customer_id": 1111111111,
      "customer": "John Doe",
      "id": 89591350,
      "source": "mallCz",
      "external_id": "24bcb8fe-13d8-11ed-861d-0242ac120002",
      "purchase_id": 89591351,
      "cod": 25.0,
      "ship_date": "2017-01-14",
      "delivered_at": "2018-01-14 08:13:00",
      "status": "open",
      "confirmed": true,
      "test": false,
      "mdp": false,
      "mdp_classic": false,
      "mdp_spectrum": false,
      "shipped": "2019-07-02 10:19:14",
      "shipping": "2019-07-02 10:19:14",
      "open": "2019-07-02 10:19:14",
      "blocked": "2019-07-02 10:19:14",
      "lost": "2019-07-02 10:19:14",
      "returned": "2019-07-02 10:19:14",
      "cancelled": "2019-07-02 10:19:14",
      "delivered": "2019-07-02 10:19:14"
    }
  ],
  "result": {
    "code": 200,
    "status": "OK"
  },
  "paging": {
    "pages": 1,
    "size": 1,
    "page": 1
  }
}
Response examples (200)
{
  "data": [
    {
      "customer_id": 1111111111,
      "customer": "John Doe",
      "id": 89591350,
      "source": "mallCz",
      "external_id": "24bcb8fe-13d8-11ed-861d-0242ac120002",
      "purchase_id": 89591351,
      "cod": 25.0,
      "ship_date": "2017-01-14",
      "delivered_at": "2018-01-14 08:13:00",
      "status": "open",
      "confirmed": true,
      "test": false,
      "mdp": false,
      "mdp_classic": false,
      "mdp_spectrum": false,
      "shipped": "2019-07-02 10:19:14",
      "shipping": "2019-07-02 10:19:14",
      "open": "2019-07-02 10:19:14",
      "blocked": "2019-07-02 10:19:14",
      "lost": "2019-07-02 10:19:14",
      "returned": "2019-07-02 10:19:14",
      "cancelled": "2019-07-02 10:19:14",
      "delivered": "2019-07-02 10:19:14"
    }
  ],
  "result": {
    "code": 200,
    "status": "OK"
  },
  "paging": {
    "pages": 1,
    "size": 1,
    "page": 1
  }
}