Order API - Get Orders

Get orders

Endpoint: GET *base*/orders?[&limit=5][&offset=5][&order=83651][&customer_id=1][&xml=1]
Authentication: API Key

This will fetch the orders allowed for the plugin being set up.

Parameters

limit
int
optional

Limit amount of orders returned. Default: 20.

offset
int
optional

Offset how far in to start returning orders.

order
int
optional

Return a specific order.

customer_id
int
optional

Return orders for specified customer id.

newer_than
date/datetime
optional

Return order newer than date. Allowed formats YYYY-mm-dd and YYYY-mm-dd HH:MM:SS. Timezone is system-wide and decided by the company using Centra.

newer_than
date/datetime
optional

Return order newer than date. Allowed formats YYYY-mm-dd and YYYY-mm-dd HH:MM:SS. Timezone is system-wide and decided by the company using Centra.

older_than
date/datetime
optional

Return order newer than date. Allowed formats YYYY-mm-dd and YYYY-mm-dd HH:MM:SS. Timezone is system-wide and decided by the company using Centra.

xml
boolean
optional

Response in xml format instead of json.

Request example

GET <base>/orders?newer_than=2019-01-01+12:11:39&limit=10 HTTP/1.1

Response

200 Content-type: application/json

status
string
required

ok if success, else no.

orders
array
required

Array of orders returned.

orderId
string
optional

ID of the order.

orderStatus
string
optional

Status of the order.

selectionId
string
optional

Selection ID of the order.

orderDate
datetime
optional

Date when order was created.

products
array
optional

Products inside the order.

lineId
string
optional

ID of the specific product item in this order.

qty
int
optional

Quantity of this specific product item.

isBundle
boolean
optional

Flag showing if product is bundle

isPartOfBundle
int
optional

Bundle id

bundle
array
optional

Array of containing items for bundle

taxBreakdown
array
optional

Lists all tax rules applied to the order.

description
string
optional

Text description of tax rule. ex: VAT

taxPercent
float
optional

Percentage of tax. ex 25

value
float
optional

How much tax. ex 20

paymentPlugin
string
optional

Payment plugin type, e.g. adyen_drop_in, klarna_checkout_v1, paypal_v1, etc.

paymentType
string
optional

Payment method type, one of: cc, inv, 3rd, free, prepaid. Where cc = credit card, inv = invoice, 3rd = third party. Value is not unique, more than one payment method can have

paymentDescription
string
optional

Payment method description from plugin configuration.

paymentReference
string
optional

Payment reference ID from external service provider. Can be null.

paymentMethod
string
optional

Payment method ID - unique name of payment provider. Can be null.

Response example

HTTP/1.1 200 OK
Content-type: application/json

{
  "status": "ok",
  "orders": [
    {
      "orderId": "83651",
      "selectionId": "7dee9426b07b13ec452f87a3b67aa6be",
      "orderDate": "2012-02-04 15:16:13",
      "cancelDate": "2012-08-04 15:16:13",
      "preferredDeliveryDate": "2012-05-04 15:16:13",
      "estimatedDeliveryDate": "2012-05-04 15:16:13",
      "orderStore": "retail",
      "orderCurrency": "EUR",
      "customerId": "12345",
      "accountId": "",
      "deliveryName": "Someones Name",
      "deliveryCompany": "",
      "deliveryEmail": "deliveries@example.com",
      "deliveryCell": "+4912345678",
      "deliveryTele": "",
      "deliveryAddress": "Examplestreet 1",
      "deliveryCoaddress": "",
      "deliveryZipcode": "12345",
      "deliveryCity": "Somecity",
      "deliveryState": "",
      "deliveryCountry": "DE",
      "billingName": "Someones Name",
      "billingCompany": "",
      "billingEmail": "billing@example.com",
      "billingTele": "",
      "billingAddress": "Examplestreet 1",
      "billingCoaddress": "",
      "billingZipcode": "12345",
      "billingCity": "Somecity",
      "billingState": "",
      "billingCountry": "DE",
      "billingVAT": "",
      "poNumber": "",
      "shippingList": "standard",
      "suspect": 0,
      "internalOrder": 0,
      "hold": 0,
      "shippingValue": 25,
      "voucherValue": 0,
      "grandTotalValue": 3978.75,
      "grandTotalTaxValue": 795.75,
      "taxAdded": 0,
      "taxDeducted": 0,
      "internalComment": "",
      "otherComment": "",
      "marketId": 1,
      "pricelistId": 1,
      "ipAddress": "127.0.0.1",
      "paymentPlugin": "klarna_checkout_v1",
      "paymentType": "free",
      "paymentDescription": "Klarna checkout v3",
      "paymentReference": "12345678-1234-1234-864e-6ef2621c4ab6",
      "paymentMethod": "klarna",
      "defaultCarrier": "",
      "shipments": [
        {
            "shipmentId": "16-1",
            "shippedDate": "0000-00-00 00:00:00",
            "carrier": "",
            "service": "",
            "trackingId": "",
            "trackingUrl": "",
            "returnSlipTracking": "",
        }
      ],
      "totalItemsPriceTax": -202.88,
      "totalItemsPrice": 811.5,
      "totalItemsWithoutTax": 608.62,
      "taxBreakdown": [
        {
          "description": "VAT",
          "taxPercent": 25,
          "value": 795.75
        }
      ],
      "products": [
        {
          "lineId": "43243",
          "sku": "S123K345U1",
          "variantSku": "",
          "sizeSku": "",
          "ean": "1234567890123",
          "name": "Product #1",
          "variant": "White",
          "brand": "Brand",
          "size": "XS",
          "qty": 1,
          "originalPrice": 500.5,
          "price": 450.5,
          "weight": 2,
          "weightUnit": "kg",
          "countryOfOrigin": "DE",
          "harmCode": "12345",
          "comment": "",
          "otherComment": "",
          "taxPercent": 0,
          "priceDiscount": 50.0,
          "priceDiscountAsPercent": 0,
          "taxValue": 112.63,
          "totalPrice": 450.5,
          "anyDiscount": false,
          "priceEachWithoutTax": 337.87,
          "priceEachReduction": 0,
          "warehouses": [
            {
                "name": "Default",
                "itemQty": 1
            }
          ],
        "isBundle": false,
        "isPartOfBundle": "217"
        },
        {
          "lineId": "43244",
          "sku": "S123K345U2",
          "variantSku": "",
          "sizeSku": "",
          "ean": "1234567890124",
          "name": "Product #2",
          "variant": "Blue",
          "brand": "Brand",
          "size": "XS",
          "qty": 2,
          "originalPrice": 200.5,
          "price": 180.5,
          "weight": 1.5,
          "weightUnit": "kg",
          "countryOfOrigin": "CI",
          "harmCode": "12345",
          "comment": "",
          "taxPercent": 25,
          "priceDiscount": 0,
          "priceDiscountAsPercent": 0,
          "taxValue": 90.25,
          "totalPrice": 361,
          "anyDiscount": false,
          "priceEachWithoutTax": 270.75,
          "priceEachReduction": 0,
          "warehouses": [
            {
                "name": "Default",
                "itemQty": 2
            }
          ],
          "isBundle": true,
          "bundle": [
            {
              "lineId": "43243",
              "sku": "S123K345U1",
              "variantSku": "",
              "sizeSku": "",
              "ean": "1234567890123",
              "name": "Product #1",
              "variant": "White",
              "brand": "Brand",
              "size": "XS",
              "qty": 1,
              "originalPrice": 500.5,
              "price": 450.5,
              "weight": 2,
              "weightUnit": "kg",
              "countryOfOrigin": "DE",
              "harmCode": "12345",
              "comment": "",
              "otherComment": "",
              "taxPercent": 0,
              "priceDiscount": 50.0,
              "priceDiscountAsPercent": 0,
              "taxValue": 112.63,
              "totalPrice": 450.5,
              "anyDiscount": false,
              "priceEachWithoutTax": 337.87,
              "priceEachReduction": 0,
              "warehouses": [
                {
                    "name": "Default",
                    "itemQty": 1
                }
              ],
            "isBundle": false,
            "isPartOfBundle": "217"
            },
        ]
        }
      ],
      "totalItemsDiscount": 38.11,
      "discounts": {
        "anyDiscount": false,
        "discount": "0.00 USD",
        "discountAsNumber": 0,
        "vouchers": [
          {
            "voucher": "vip123",
            "name": "Some voucher",
            "priceOff": "-150.00 USD",
            "priceOffAsANumber": -150.0,
            "description": "This is VIP code description"
          }
        ],
        "automaticDiscounts": [
          {
            "automaticDiscount": "12345",
            "name": "Some discount",
            "priceOff": "0.00 USD",
            "priceOffAsANumber": 0
          }
        ]
      }
    }
  ]
}

Previous article: Order API - Complete Order
Next article: Order API - Update order