Get orders

Order API v1
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.

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.

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

1
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
Id of the order.

orderStatus

string
Status of the order.

selectionId

string
Selection ID of the order.

orderDate

datetime
Date when order was created.

products

array

Products inside the order.

lineId

string
Id of the specific product item in this order.

qty

int
Quantity of this specific product item.

Response example

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
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,
      "internalComment": "",
      "otherComment": "",
      "marketId": 1,
      "pricelistId": 1,
      "ipAddress": "127.0.0.1",
      "paymentType": "free",
      "paymentDescription": "",
      "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,
      "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
             }
          ]
        },
        {
          "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
             }
          ]             
        }
      ],
      "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 
           }
         ]
      }
    }
  ]
}