Orders GET - json

The call is used for retrieving orders created in the CloudSuite webshop. You can fetch an order list and individual orders.

Get order list

Retrieves a list of orders from the CloudSuite database. Optional you can include a create/modified date, sale date or order status. The result is a paginated order list. More information on the order flow can be checked at https://cloudsuite.atlassian.net/wiki/spaces/CCS/pages/2204401989

In order to exclude the offline orders you can add the parameter offline=false to the URL

URL

GET /api/order/

Fields

Field

Value

Remarks

Field

Value

Remarks

count

Number of orders for this result

 

next

Next page of results

 

previous

Previous page of results

 

results

Order object

 

results - id

ID of the order

Can be used to get order details.

results - reference

CloudSuite reference

 

results - customer_order_number

Customer order number

Entered by the end-user during the ordering in the checkout.

results - erp_order_number

The ERP number of the order

Must be sent by the ERP system to CloudSuite.

results - state

The order status
[draft, quotation, confirmed, processing, done, cancel]

 

results - order_date

The sale date

 

results - create_date

Creation date

This is not the sale date

results - modified_date

Last modified date

 

Response

{ "count": 26, "next": "https://test.cloudsuite.io/api/order/?limit=5&offset=10", "previous": "https://test.cloudsuite.io/api/order/?limit=5", "results": [ { "id": 6, "reference": "CS6", "customer_order_number": null, "erp_order_number": null, "state": "confirmed", "order_date": "2020-09-09", "create_date": "2020-09-09T13:44:42.733072", "modified_date": "2020-09-09T13:44:43.295899" }, ... { "id": 7, "reference": "CS7", "customer_order_number": "Test", "erp_order_number": null, "state": "confirmed", "order_date": "2020-09-09", "create_date": "2020-09-09T14:56:16.858569", "modified_date": "2020-09-09T14:56:17.314175" } ] }

Get Order

The shipment_address, invoice_address, user and customer keys are returned with an ID.
The corresponding info can be retrieved by adding the related ID to the endpoint.

  • GET /api/address/{id} → GET /api/origin/{origin}/address/{key from previous call}

  • GET /api/user/{id} → GET /api/origin/{origin}/user/{key from previous call}

  • GET /api/customer/{id} → GET /api/origin/{origin}/customer/{key from previous call}

URL

GET /api/order/{id}

Fields

Field

Value

Remarks

Field

Value

Remarks

id

Unique order ID

 

reference

The CloudSuite order number

 

customer_order_number

The reference number the customer has entered for the order

 

erp_order_number

The ERP order number. Can be set with a PUT of PATCH on the order

 

state

The state of the order.

Possible states are:
draft → order is being created or stored
quotation → order is requested at ERP as a quotation
confirmed → order is created by webuser
processing → order is being processed by ERP
done → order completely done
cancel → order is canceled

order_date

Date the order has been placed (YYY-MM-DD)

 

description

Order description

 

currency

Currency used in the order

 

order_lines

Order lines object

 

order_lines - id

The ID of the orderline

 

order_lines - product - origin

The origin of the product

 

order_lines - product - key

The import_key of the product

 

order_lines - description

The product description

 

order_lines - type

 

 

order_lines - quantity

Number of items

 

order_lines - erp_line_number

The line number of the order given by the ERP system

 

order_lines - unit_price

Price of the product, excl. tax, one sales unit

 

order_lines - create_date

Created timestamp of the order

 

order_lines - delivery_date

The delivery date of the line

 

order_lines - tax_keys

Array of tax keys of the order line

 

order_lines - modified_date

Timestamp when the order was last modified

 

requested_delivery_date

The requested delivery date for the order

 

paid_amount

Amount paid for this order

 

shipment_address

ID of the shipment address

/api/address/{id} can be used to get more data.

shipment_address_key → origin

the origin of the delivery address

 

shipment_address_key → key

the key of the delivery address

 

invoice_address

ID of the invoice address

/api/address/{id} can be used to get more data.

invoice_address_key→ origin

the origin of the invoice address

 

invoice_address_key→ key

the key of the invoice address

 

customer

ID of the customer

/api/customer/{id} can be used to get more data.

customer_key→ origin

the origin of the customer

 

customer_key→ key

the key of the customer

 

webshop

ID of the webshop

Can be fixed set of data on the integration side.

user

ID of the end-user who placed the order

/api/user/{id} can be used to get more data.

create_date

Creation date of the order

modified_date

Last modified date of the order

 

Response

© 2024 CloudSuite BV, All rights reserved