This API is to be used by you to receive a summary of order lines. You may provide a type parameter to determine whether only pending or historic order lines are provided, or all orders otherwise. You may also provide a date range to filter the data received, up to a maximum range of 35 days. You may also provide a search term, which will search against the customer name, postcode, contact number, email, or order number or order status.
You are also expected to have made a request to the authenticate API beforehand to have successfully logged in, and to provide the session cookie given in the authenticate response in the request to this API.
Our Order Statuses:
- U Unfulfilled
- PF Part-Fulfilled
- F Fulfilled
- C Cancelled
Use order_feed.api with type set as “new” to pull in orders which haven’t been acknowledged.
Use order_ack.api to acknowledge the order.
Use order_feed.api with type set as “pending” to pull in orders which have previously been acknowledged.
Parameters
| Name | Notes |
| supplier_id | (required) your id, passed to you from the authenticate api, to confirm who you are. |
| search | (optional) search term to filter the data received. |
| type | (optional) either "all" (default), "new", "pending", or "historic". |
| from | (optional) the earliest date from which orders may be returned. |
| to | (optional) the latest date from which orders may be returned. This may not result in a date range greater than 35 days. |
| mode | (optional) either "Test", or "Live", the expected mode the supplier account is in. |
Example Request
https://supplier.rstore.com/rest/order_feed.api?supplier_id=1
With JSON Content:
{
"search": "W000001",
"type": "all",
"from": "2016-05-01 00:00:00",
"to": "2016-06-01 00:00:00",
"mode": "Test"
}
With Cookie Header:
Cookie: "ksi=abcdefghijklmnopqrstuvwxyz123"
Response
On Success:
{
"order_arr": [
{
"order_disp": "W31017240-1M-V",
"customer_name": "Roboute Guilliman",
"postcode": "PL65ZD",
"building_name_number": "The Range",
"organisation": "The Range",
"street": "The Range Head Office, William Prance Road",
"city": "Plymouth",
"county": null,
"country": "United Kingdom",
"customer_telephone": "07777777777",
"customer_email_address": "example@therange.co.uk",
"product_code": "ZXCVBN",
"title": "Plain Daylights Moth",
"qty": 2,
"status": "U",
"sku": 123456,
"price": 5360,
"order_placed_date": "2022-06-14 16:10:17",
"despatch_date": null,
"courier_name": null,
"delivery_service": "mainland",
"tracking_reference": null,
"notes": null
},
{
"order_disp": "W31017236-1M-V",
"customer_name": "CORVUS CORAX",
"postcode": "PL65ZD",
"building_name_number": "The Range",
"organisation": "The Range",
"street": "The Range Head Office, William Prance Road",
"city": "Plymouth",
"county": null,
"country": "United Kingdom",
"customer_telephone": "07777777777",
"customer_email_address": "example@therange.co.uk",
"product_code": "ASDFGH",
"title": "Plain Daylights Moth",
"qty": 1,
"status": "U",
"sku": 1002972,
"price": 4559,
"order_placed_date": "2022-06-14 16:02:13",
"despatch_date": null,
"courier_name": null,
"delivery_service": "mainland",
"tracking_reference": null,
"notes": null
},
{
"order_disp": "W31017236-1M-V",
"customer_name": "CORVUS CORAX",
"postcode": "PL65ZD",
"building_name_number": "The Range",
"organisation": "The Range",
"street": "The Range Head Office, William Prance Road",
"city": "Plymouth",
"county": null,
"country": "United Kingdom",
"customer_telephone": "07777777777",
"customer_email_address": "example@therange.co.uk",
"product_code": "TYUIOP",
"title": "Plain Daylights Moth",
"qty": 1,
"status": "U",
"sku": 789456,
"price": 2448,
"order_placed_date": "2022-06-14 16:02:13",
"despatch_date": null,
"courier_name": null,
"delivery_service": "mainland",
"tracking_reference": null
}
],
"records_total": 3,
"records_filtered": 3
}
Response for custom products
{
"order_arr":[
{
"order_disp":"W31017240-1M-V",
"customer_name":"Roboute Guilliman",
"postcode":"PL65ZD",
"building_name_number":"The Range",
"organisation":"The Range",
"street":"The Range Head Office, William Prance Road",
"city":"Plymouth",
"county":null,
"country":"United Kingdom",
"customer_telephone":"07777777777",
"customer_email_address":"example@therange.co.uk",
"product_code":"ZXCVBN",
"title":"Wooden Sword",
"qty":2,
"status":"U",
"sku":123456,
"price":5360,
"order_placed_date":"2022-06-14 16:10:17",
"despatch_date":null,
"courier_name":null,
"delivery_service":"mainland",
"tracking_reference":null,
"notes":null
},
{
"order_disp":"W31017236-1M-V",
"customer_name":"Corvus Corax",
"postcode":"PL65ZD",
"building_name_number":"25",
"organisation":"The Range",
"street":"The Range Head Office, William Prance Road",
"city":"Plymouth",
"county":null,
"country":"United Kingdom",
"customer_telephone":"07777777777",
"customer_email_address":"example@therange.co.uk",
"product_code":"ASDFGH",
"title":"Bird Cage",
"qty":1,
"status":"U",
"sku":456258,
"price":4559,
"order_placed_date":"2022-06-14 16:02:13",
"despatch_date":null,
"courier_name":null,
"delivery_service":"mainland",
"tracking_reference":null,
"notes":null
},
{
"order_disp":"W31017236-1M-V",
"customer_name":"Corvus Corax",
"postcode":"PL65ZD",
"building_name_number":"25",
"organisation":"The Range",
"street":"The Range Head Office, William Prance Road",
"city":"Plymouth",
"county":null,
"country":"United Kingdom",
"customer_telephone":"07777777777",
"customer_email_address":"example@therange.co.uk",
"product_code":"TYUIOP",
"title":"Plain Daylights Blue",
"qty":1,
"status":"U",
"sku":789456,
"price":2448,
"order_placed_date":"2022-06-14 16:02:13",
"despatch_date":null,
"courier_name":null,
"delivery_service":"mainland",
"tracking_reference":null,
"custom_attribute":{ #Visible depending on category, attributes differ on category
"width":"100",
"length":"200",
"Measure to":"Blind Size"
"Colour":"Ultramarine Blue"
}
}
],
"records_total":3,
"records_filtered":3
}
On Missing Cookie, or Not Logged In
HTTP/1.0 401 Not Authenticated
User not authenticated
On Invalid Json Provided:
HTTP/1.0 400 Invalid Request
Invalid json provided
On Missing/Incorrect Supplier Parameter
HTTP/1.0 400 Invalid Request
User not authorised to load this supplier's orders
On Invalid Supplier Parameter
HTTP/1.0 400 Invalid Request
No supplier found with id 123
On Expected Mode being "Live", but Supplier Account is "Test"
HTTP/1.0 400 Invalid Request
Supplier is currently in Test Mode, but expected Live Mode
On Expected Mode being "Test", but Supplier Account is "Live"
HTTP/1.0 400 Invalid Request
Supplier is currently in Live Mode, but expected Test Mode
Comments
0 comments
Article is closed for comments.