Customer Order
When a customer wants to place an order for items that they intent to collect or pay for later they create a customer order. This order will include the items that they want to purchase in addition to any payments that have been made on the order.
The Customer Order
endpoints in LS One API allow users to see created customer orders.
Actions
GET |
Get customer order |
GET |
Get all customer orders |
POST |
Search customer orders |
Properties
Field | Data type | Validation | Description |
---|---|---|---|
gid |
guid |
Required | Unique identifier of the customer order |
reference | string | - | Reference of the customer order |
source | guid | - | Source identifier of the customer order |
delivery | guid | - | Delivery identifier of the customer order |
customerID | string | - | Unique identifier of the customer |
expiryDate | datetime | - | Expiration date of the order |
deliveryLocation | string | - | Delivery location of the customer order |
orderType | enum | - |
Order type of the customer order:
|
orderXml | string | - | Xml of the customer order |
storeID | string | - | Unique identifier of the store |
staffID | string | - | Unique identifier of the staff used to create customer order |
terminalID | string | - | Unique identifier of the terminal the order is made |
createdDate | datetime | - | Creation date of the order |
status | enum | - |
Status of the customer order:
|
comment | string | - | Comment of the customer order |
Examples
Get customer order
Returns details of a single customer order.
GET /api/customer/orders/{gid}
Permissions
-
CustomerOrder:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'GET' \
'https://lsoneapi.lsretail.com/api/customer/orders/2CD5ACE7-24CB-4023-8FB6-D4F799BB20CC' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authentication_token}'
Parameter | Data type | Validation | Description |
---|---|---|---|
gid | guid |
Required |
The unique identifier of the customer order |
Response
{
"gid": "2cd5ace7-24cb-4023-8fb6-d4f799bb20cc",
"reference": "Order1",
"source": "dd8a8e29-4256-4816-a3f6-effc905bfc3f",
"delivery": "0a6f6a4b-d5c3-4243-9bd2-52020a60bfc7",
"customerID": "00013",
"expiryDate": "2022-10-18T16:39:02.227",
"deliveryLocation": "0001",
"orderType": 2,
"orderXML": "",
"storeID": "S0001",
"staffID": " ",
"terminalID": " ",
"createdDate": "2021-10-18T16:39:02.227",
"status": 1,
"comment": "test"
}
Error codes
Code | Description |
---|---|
200 Success | Success |
401 Unauthorized | LS One API client did not provide a valid authentication token or it does not have permissions to read customer order(s) |
404 Not Found | The requested customer order was not found |
Get all customer orders
Returns an object that contains a subset of all customer orders and the total number of records that can be used for pagination.
GET /api/customer/orders?page={page}&pageSize={pageSize}
Customer orders can be retrieved paginated using the folowing properties:
Pagination properties
Permissions
-
CustomerOrder:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'POST' \
'https://lsoneapi.lsretail.com/api/customer/orders?page=1&pageSize=10' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authorization_token}' \
-H 'Content-Type: application/json' \
-d '{
}'
Parameter | Data type | Validation | Description |
---|---|---|---|
page | int | - | The page number, starting from 1 |
pageSize | int | - | The size of the page |
Response
"items": [
{
"gid": "2cd5ace7-24cb-4023-8fb6-d4f799bb20cc",
"reference": "Order1",
"source": "dd8a8e29-4256-4816-a3f6-effc905bfc3f",
"delivery": "0a6f6a4b-d5c3-4243-9bd2-52020a60bfc7",
"customerID": "00013",
"expiryDate": "2022-10-18T16:39:02.227",
"deliveryLocation": "0001",
"orderType": 2,
"orderXML": "",
"storeID": "S0001",
"staffID": " ",
"terminalID": " ",
"createdDate": "2021-10-18T16:39:02.227",
"status": 1,
"comment": "test"
}
...
],
"totalCount": 1
}
Status codes
Code | Text | Description |
---|---|---|
200 | Success | Success |
401 | Unauthorized | LS One API client did not provide a valid authentication token or it does not have permissions to read customer order(s) |
404 | Not Found | No customer orders found |
Search customer orders
Returns an object that contains a subset of searched customer orders and the total number of records that can be used for pagination.
POST /api/customer/orders/search?page={page}&pageSize={pageSize}
Customer orders can be searched with a CustomerOrderFilters object that has the folowing properties:
Filters properties
Field | Data type | Validation | Description |
---|---|---|---|
gid | guid | - | Search customer orders by item gid |
reference | string | - | Search customer orders by reference |
customerID | string | - | Search customer orders by customer id |
customerName | string | - | Search customer orders by customer name |
delivery | string | - | Search customer orders by delivery identifier |
source | string | - | Search customer orders by source identifier |
deliveryLocation | string | - | Search customer orders by delivery location |
comment | string | - | Search customer orders by comment |
status | int | - | Search customer orders by status |
expired | boolean | - | Search customer orders that are marked as expired |
orderType | int | - | Search customer orders by type |
retrieveOrderXML | boolean | - | If true, the customer order search response will include the order xml |
Permissions
-
CustomerOrder:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'POST' \
'https://lsoneapi.lsretail.com/api/customer/orders/search?page=1&pageSize=10' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authorization_token}' \
-H 'Content-Type: application/json' \
-d '{
"reference": "Order"
}'
Parameter | Data type | Validation | Description |
---|---|---|---|
page | int | - | The page number, starting from 1 |
pageSize | int | - | The size of the page |
Response
{
"items": [
{
"gid": "2cd5ace7-24cb-4023-8fb6-d4f799bb20cc",
"reference": "Order1",
"source": "dd8a8e29-4256-4816-a3f6-effc905bfc3f",
"delivery": "0a6f6a4b-d5c3-4243-9bd2-52020a60bfc7",
"customerID": "00013",
"expiryDate": "2022-10-18T16:39:02.227",
"deliveryLocation": "0001",
"orderType": 2,
"orderXML": "",
"storeID": "S0001",
"staffID": " ",
"terminalID": " ",
"createdDate": "2021-10-18T16:39:02.227",
"status": 1,
"comment": "test"
}
],
"totalCount": 1
}
Status codes
Code | Text | Description |
---|---|---|
200 | Success | Success |
401 | Unauthorized | LS One API client did not provide a valid authentication token or it does not have permissions to read customer order(s) |
404 | Not Found | No customer orders found |