Purchase order
Purchase orders is a document that is used to order the items you need to stock up on from your vendors. The purchase order updates the inventory status of your items. When a purchase order has been created for some items, the items are listed ordered but when a purchase order has been received the on-hand inventory of the ordered items is updated. To receive a purchase order you can either post and receive the purchase order directly or create a goods receiving document against it.
-
A purchase order can contain multiple items to be ordered from a specific vendor.
-
A purchase order is a order of items to be delivered to a specific store.
-
Item replenishment settings can help with the quantity to be ordered.
The inventory/purchase-order endpoint in LS One API allows management of purchase orders as well as posting and receiving existing purchase orders.
Actions
Properties
PurchaseOrder
| Field | Data type | Validation | Description |
|---|---|---|---|
| id | string |
- |
Unique identifier of the purchase order |
| description | string |
Required |
Description of the purchase order |
| vendorID | string |
Required |
Unique identifier for the vendor of the purchase order |
| vendorName | string |
- |
Name of the vendor of the purchase order |
| purchaseStatus | int |
- |
Current purchase status of the purchase order:
|
| deliveryDate | datetime |
Required |
Delivery date of the purchase order |
| currencyCode | string |
Required |
Currency code of the purchase order |
| currencyDescription | string |
- |
Description of the currency |
| createdDate | datetime |
- |
Date when purchase order is created |
| orderer | guid |
- |
Unique identifier of the resource who ordered the purchase order |
| storeId | string |
Required |
Unique identifier of the store to which the purchase order is assigned |
| storeName | string |
- |
Name of the store |
| defaultDiscountPercentage | decimal |
- |
Default discount percentage applied |
| defaultDiscountAmount | decimal |
- |
Default discount amount applied |
| orderingDate | datetime |
Required |
Ordering date of the purchase order |
| createdFromOmni | bool |
- |
Purchase order was created from the mobile inventory app |
| templateID | string |
- |
Unique identifier of the template used to create purchase order |
| processingStatus | int |
- |
Current processing status of the purchase order:
|
PurchaseOrderLine
| Field | Data type | Validation | Description |
|---|---|---|---|
| purchaseOrderID | string |
Required |
Unique identifier of the purchase order to which this line belongs to |
| lineNumber | string |
Required |
Unique identifier for the purchase order line |
| itemId | string |
- |
Unique identifier of the item that the purchase order line is for |
| itemName | string |
- |
Name of the item that the purchase order line is for |
| vendorItemID | string |
- |
Vendor identifier for the item that the purchase order line is for |
| variantName | string |
- |
Variant name of the item that the purchase order line is for |
| unitId | string |
Required |
Identifier of the unit of measure of the item from this purchase order line |
| unitName | string |
- |
Unit of measure name of the item from this purchase order line |
| quantity | decimal |
Required |
Quantity to purchase |
| unitPrice | decimal |
Required |
Item unit price |
| discountAmount | decimal |
- |
Discount amount applied in this purchase order line |
| discountPercentage | decimal |
- |
Discount percentage applied in this purchase order line |
| taxAmount | decimal |
- |
Tax amount for the item price |
| taxCalculationMethod | enum |
- |
Method used for tax calculation:
|
| pictureID | string |
- |
An image associated with this purchase order line |
| omniLineID | string |
- |
Identifier of the line that was assigned to it by the inventory app |
| omniTransactionID | string |
- |
Identifier of the transaction in the inventory app that this line was created on |
Examples
Get purchase order
Returns details of a single purchase order .
GET /api/inventory/purchase-order/{id}
Permissions
-
PurchaseOrder:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'GET' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order/00000003' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authentication_token}'
| Parameter | Data type | Validation | Description |
|---|---|---|---|
| id | string |
Required |
Unique identifier of the purchase order |
Response
{
"id": "00000001",
"purchaseOrderID": "00000001",
"description": "Test purchare order",
"vendorID": "0000001",
"vendorName": "Fashion House",
"purchaseStatus": 0,
"deliveryDate": "2021-11-17T09:56:55.597",
"currencyCode": "EUR",
"currencyDescription": "Euro",
"createdDate": "2021-11-12T09:57:35.557",
"orderer": "00000000-0000-0000-0000-000000000000",
"storeID": "S0003",
"storeName": "Aurora Supermarket",
"defaultDiscountPercentage": 2.000000,
"defaultDiscountAmount": 0.000000,
"orderingDate": "2021-11-12T00:00:00",
"createdFromOmni": false,
"templateID": "",
"processingStatus": 0
}
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 purchase order(s) |
| 404 | Not Found | The requested purchase order was not found |
Get all purchase orders
Returns an object that contains a list of purchase orders and the total number of records that can be used for pagination.
GET /api/inventory/purchase-order?page={page_number}&pageSize={page_size}
Permissions
-
PurchaseOrder:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'GET' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order?page=1&pageSize=50' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authentication_token}'
| Parameter | Data type | Validation | Description |
|---|---|---|---|
| page | int |
- |
The page number. Default value = 1. |
| pageSize | int |
- |
The page size. Default value = 100. |
Response
{
"items": [
{
"id": "00000002",
"purchaseOrderID": "00000002",
"description": "Soda PR",
"vendorID": "0000002",
"vendorName": "Grocery Barn",
"purchaseStatus": 0,
"deliveryDate": "2021-11-17T18:25:14.78",
"currencyCode": "USD",
"currencyDescription": "US Dollar",
"createdDate": "2021-11-12T18:25:50.177",
"orderer": "00000000-0000-0000-0000-000000000000",
"storeID": "S0001",
"storeName": "Aurora Supermarket",
"defaultDiscountPercentage": 2.000000,
"defaultDiscountAmount": 0.000000,
"orderingDate": "2021-11-12T00:00:00",
"createdFromOmni": false,
"templateID": "",
"processingStatus": 0
},
{
"id": "00000006",
"purchaseOrderID": "00000006",
"description": "Weekly Po",
"vendorID": "0000002",
"vendorName": "Grocery Barn",
"purchaseStatus": 0,
"deliveryDate": "2021-11-17T14:29:51.89",
"currencyCode": "USD",
"currencyDescription": "US Dollar",
"createdDate": "2021-11-14T14:30:07.743",
"orderer": "00000000-0000-0000-0000-000000000000",
"storeID": "S0001",
"storeName": "Aurora Supermarket",
"defaultDiscountPercentage": 0.000000,
"defaultDiscountAmount": 0.000000,
"orderingDate": "2021-11-14T00:00:00",
"createdFromOmni": false,
"templateID": "",
"processingStatus": 0
},
...
],
"totalCount": 10
}
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 purchase order(s) |
| 404 | Not Found | No purchase orders found |
Search purchase orders
Returns an object that contains a subset of searched purchase orders and the total number of records that can be used for pagination.
POST /api/inventory/purchase-order/search?page={page_number}&pageSize={page_size}
Purchase orders can be searched using a filter object that has the following properties:
Filter properties
| Field | Data type | Validation | Description |
|---|---|---|---|
| idOrDescription | string | - | Search by id or description |
| vendorID | string | - | Search items by vendor id |
| storeID | string | - | Search by the store id |
| sortBy | int | - |
Sort result items by criteria:
|
| status | int | - |
Search by status value:
|
| deliveryDateFrom | DateTime | - | Search purchase orders that where delivered starting from given value |
| deliveryDateTo | DateTime | - | Search purchase orders that where delivered until given value |
| creationDateFrom | DateTime | - | Search purchase orders that where created starting from given value |
| creationDateTo | DateTime | - | Search purchase orders that where created until given value |
Permissions
-
PurchaseOrder:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'POST' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-orders/search?page=1&pageSize=50' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authorization_token}' \
-H 'Content-Type: application/json' \
-d '{
"idOrDescription": ["Soda PR"]
}'
| Parameter | Data type | Validation | Description |
|---|---|---|---|
| page | int |
- |
The page number. Default value = 1. |
| pageSize | int |
- |
The page size. Default value = 100. |
Response
{
"items": [
{
"id": "00000002",
"purchaseOrderID": "00000002",
"description": "Soda PR",
"vendorID": "0000002",
"vendorName": "Grocery Barn",
"purchaseStatus": 0,
"deliveryDate": "2021-11-17T18:25:14.78",
"currencyCode": "USD",
"currencyDescription": "US Dollar",
"createdDate": "2021-11-12T18:25:50.177",
"orderer": "00000000-0000-0000-0000-000000000000",
"storeID": "S0001",
"storeName": "Aurora Supermarket",
"defaultDiscountPercentage": 2.000000,
"defaultDiscountAmount": 0.000000,
"orderingDate": "2021-11-12T00:00:00",
"createdFromOmni": false,
"templateID": "",
"processingStatus": 0
},
{
"id": "00000006",
"purchaseOrderID": "00000006",
"description": "Weekly Po",
"vendorID": "0000002",
"vendorName": "Grocery Barn",
"purchaseStatus": 0,
"deliveryDate": "2021-11-17T14:29:51.89",
"currencyCode": "USD",
"currencyDescription": "US Dollar",
"createdDate": "2021-11-14T14:30:07.743",
"orderer": "00000000-0000-0000-0000-000000000000",
"storeID": "S0001",
"storeName": "Aurora Supermarket",
"defaultDiscountPercentage": 0.000000,
"defaultDiscountAmount": 0.000000,
"orderingDate": "2021-11-14T00:00:00",
"createdFromOmni": false,
"templateID": "",
"processingStatus": 0
},
...
],
"totalCount": 10
}
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 purchase order(s) |
| 404 | Not Found | No purchase orders found |
Create a new purchase order
Creates a new purchase order .
POST /api/inventory/purchase-order
To create a new purchase order, the following fields are required:
-
Description
-
StoreID
-
VendorID
-
DeliveryDate
-
OrderingDate
-
CurrencyCode
Permissions
-
PurchaseOrder:Write
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'POST' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authorization_token}' \
-H 'Content-Type: application/json' \
-d '{
"description": "Test po",
"storeId": "S0005",
"vendorID": "0000001",
"deliveryDate": "2021-11-14",
"orderingDate": "2021-11-14",
"currencyCode": "EUR"
}'
Response
{
"id": "0-00000007",
"purchaseOrderID": "0-00000007",
"description": "Test po",
"vendorID": "0000001",
"vendorName": null,
"purchaseStatus": 0,
"deliveryDate": "2021-11-14T00:00:00",
"currencyCode": "EUR",
"currencyDescription": null,
"createdDate": "2021-11-14T15:08:26.4954745+02:00",
"orderer": "00000000-0000-0000-0000-000000000000",
"storeID": "S0005",
"storeName": null,
"defaultDiscountPercentage": 0,
"defaultDiscountAmount": 0,
"orderingDate": "2021-11-14T00:00:00",
"createdFromOmni": false,
"templateID": null,
"processingStatus": 0
}
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 purchase order(s) |
| 400 | Bad Request | New purchase order could not be created |
Update a purchase order
Updates an existing purchase order .
PUT /api/inventory/purchase-order
To update an existing purchase order, the following fields are required:
-
Description
-
StoreID
-
VendorID
-
DeliveryDate
-
OrderingDate
-
CurrencyCode
Permissions
-
PurchaseOrder:Write
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'PUT' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authentication_token}' \
-H 'Content-Type: application/json' \
-d '{
"id": "0-00000007",
"description": "Test Update PO",
"storeId": "S0005",
"vendorID": "0000001",
"deliveryDate": "2021-11-15",
"orderingDate": "2021-11-15",
"currencyCode": "USD"
}'
Response
{
"id": "0-00000007",
"purchaseOrderID": "0-00000007",
"description": "Test Update PO",
"vendorID": "0000001",
"vendorName": null,
"purchaseStatus": 0,
"deliveryDate": "2021-11-15T00:00:00",
"currencyCode": "USD",
"currencyDescription": null,
"createdDate": "2021-11-14T15:10:22.771058+02:00",
"orderer": "00000000-0000-0000-0000-000000000000",
"storeID": "S0005",
"storeName": null,
"defaultDiscountPercentage": 0,
"defaultDiscountAmount": 0,
"orderingDate": "2021-11-15T00:00:00",
"createdFromOmni": false,
"templateID": null,
"processingStatus": 0
}
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 write purchase order(s) |
| 400 | Bad Request | Purchase order could not be updated |
| 404 | Not Found | Purchase order to be updated was not found |
Delete a purchase order
Delete an existing purchase order .
DELETE /api/inventory/purchase-order/{id}
Permissions
-
PurchaseOrder:Write
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'DELETE' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order/0-00000007' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authentication_token}'
| Parameter | Data type | Validation | Description |
|---|---|---|---|
| id | string |
Required |
The id of the purchase order |
Response
HTTP/1.1 204 No Content
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 purchase order(s) |
| 404 | Not Found | The requested purchase order was not found |
Get purchase order line
Returns details of a single purchase order line.
GET /api/inventory/purchase-order/{purchaseOrderId}/line/{lineNum}
Permissions
-
PurchaseOrder:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'GET' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order/00000006/line/00000003' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authentication_token}'
| Parameter | Data type | Validation | Description |
|---|---|---|---|
| purchaseOrderId | string |
Required |
The id of the purchase order |
| lineNumber | string |
Required |
Line number of the purchase order line |
Response
{
"id": "00000006",
"purchaseOrderID": "00000006",
"lineNumber": "00000003",
"itemID": "20030",
"itemName": "Apple, Golden Delicious",
"vendorItemID": "86791.8",
"variantName": "",
"unitID": "KG",
"unitName": "Kilos",
"quantity": 26.000000,
"unitPrice": 10.000000,
"discountAmount": 0.000000,
"discountPercentage": 0.000000,
"taxAmount": 0.476190,
"taxCalculationMethod": 2,
"pictureID": "",
"omniLineID": "",
"omniTransactionID": ""
}
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 purchase order line(s) |
| 404 | Not Found | The requested purchase order line was not found |
Get lines for specific purchase order
Returns an object that contains a list of purchase order lines and the total number of records that can be used for pagination.
GET /api/inventory/purchase-order/{purchaseOrderId}/line?page={page_number}&pageSize={page_size}
Permissions
-
PurchaseOrder:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'GET' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order/00000006/line?page=1&pageSize=50' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authentication_token}'
| Parameter | Data type | Validation | Description |
|---|---|---|---|
| purchaseOrderId | string |
Required |
The id of the purchase order |
| page | int |
- |
The page number. Default value = 1. |
| pageSize | int |
- |
The page size. Default value = 100. |
Response
{
"items": [
{
"id": "00000006",
"purchaseOrderID": "00000006",
"lineNumber": "00000003",
"itemID": "20030",
"itemName": "Apple, Golden Delicious",
"vendorItemID": "86791.8",
"variantName": "",
"unitID": "KG",
"unitName": "Kilos",
"quantity": 26.000000,
"unitPrice": 10.000000,
"discountAmount": 0.000000,
"discountPercentage": 0.000000,
"taxAmount": 0.476190,
"taxCalculationMethod": 2,
"pictureID": "",
"omniLineID": "",
"omniTransactionID": ""
},
{
"id": "00000006",
"purchaseOrderID": "00000006",
"lineNumber": "00000004",
"itemID": "20040",
"itemName": "Bananas",
"vendorItemID": "86978.1",
"variantName": "",
"unitID": "KG",
"unitName": "Kilos",
"quantity": 32.000000,
"unitPrice": 4.000000,
"discountAmount": 0.000000,
"discountPercentage": 0.000000,
"taxAmount": 0.190476,
"taxCalculationMethod": 2,
"pictureID": "",
"omniLineID": "",
"omniTransactionID": ""
},
...
],
"totalCount": 10
}
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 purchase order lines(s) |
| 404 | Not Found | No purchase order lines found |
Search purchase order lines for a purchase order
Returns an object that contains a subset of searched purchase order lines and the total number of records that can be used for pagination.
POST /api/inventory/purchase-order/{purchaseOrderId}/search?page={page_number}&pageSize={page_size}
Purchase order lines can be searched using a filter object that has the following properties:
Filter properties
| Field | Data type | Validation | Description |
|---|---|---|---|
| purchaseOrderID | string | - | Search by purchase order id |
| storeID | string | - | Search by store id |
| itemNameSearch | string[] | - | Search by item name |
| descriptionBeginsWith | boolean | - | Search for items by description starting with given value |
| variantSearch | string[] | - | Search by variant name |
| variantSearchBeginsWith | boolean | - | Search variants that begins with given value |
| unitName | string | - | Search items by unit name |
| sortBy | int | - |
Sort result items by criteria:
|
| hasDiscount | boolean | - | Search for items that have discount or not |
| sortBackwards | boolean | - | Sort result items backwards |
| quantity | decimal | - | Filter items by quantity |
Permissions
-
PurchaseOrder:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'POST' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order/00000001/search?page=1&pageSize=50' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authorization_token}' \
-H 'Content-Type: application/json' \
-d '{
"itemNameSearch": ["Apple"]
}'
| Parameter | Data type | Validation | Description |
|---|---|---|---|
| purchaseOrderId | string |
Required |
The id of the purchase order |
| page | int |
- |
The page number. Default value = 1. |
| pageSize | int |
- |
The page size. Default value = 100. |
Response
{
"items": [
{
"id": "00000006",
"purchaseOrderID": "00000006",
"lineNumber": "00000003",
"itemID": "20030",
"itemName": "Apple, Golden Delicious",
"vendorItemID": "86791.8",
"variantName": "",
"unitID": "KG",
"unitName": "Kilos",
"quantity": 26.000000,
"unitPrice": 10.000000,
"discountAmount": 0.000000,
"discountPercentage": 0.000000,
"taxAmount": 0.476190,
"taxCalculationMethod": 2,
"pictureID": "",
"omniLineID": "",
"omniTransactionID": ""
},
{
"id": "00000006",
"purchaseOrderID": "00000006",
"lineNumber": "00000004",
"itemID": "20040",
"itemName": "Bananas",
"vendorItemID": "86978.1",
"variantName": "",
"unitID": "KG",
"unitName": "Kilos",
"quantity": 32.000000,
"unitPrice": 4.000000,
"discountAmount": 0.000000,
"discountPercentage": 0.000000,
"taxAmount": 0.190476,
"taxCalculationMethod": 2,
"pictureID": "",
"omniLineID": "",
"omniTransactionID": ""
},
...
],
"totalCount": 10
}
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 purchase order lines(s) |
| 404 | Not Found | No purchase order lines found |
Create a new purchase order line
Creates a new purchase order line.
POST /api/inventory/purchase-order/{purchaseOrderId}/line
To create a new purchase order, the following fields are required:
-
PurchaseOrderID
-
ItemId
-
UnitID
-
Quantity
-
UnitPrice
Permissions
-
PurchaseOrder:Write
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'POST' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order/00000012/line' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authorization_token}' \
-H 'Content-Type: application/json' \
-d '{
"purchaseOrderID": "00000006",
"itemId": "20040",
"unitID": "KG",
"quantity": 44.000000,
"unitPrice": 10.000000
}'
| Parameter | Data type | Validation | Description |
|---|---|---|---|
| purchaseOrderId | string |
Required |
The id of the purchase order |
Response
{
"id": "00000006",
"purchaseOrderID": "00000006",
"lineNumber": "0-00000007",
"itemID": "20040",
"itemName": null,
"vendorItemID": null,
"variantName": null,
"unitID": "KG",
"unitName": null,
"quantity": 44.000000,
"unitPrice": 10.000000,
"discountAmount": 0,
"discountPercentage": 0,
"taxAmount": 0,
"taxCalculationMethod": 0,
"pictureID": null,
"omniLineID": null,
"omniTransactionID": null
}
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 write purchase order line(s) |
| 400 | Bad Request | New purchase order line could not be created |
Update a purchase order line
Updates an existing purchase order line.
PUT /api/inventory/purchase-order/{purchaseOrderId}/line
To update an existing purchase order, the following fields are required:
-
LineNum
-
PurchaseOrderID
-
ItemId
-
UnitID
-
Quantity
-
UnitPrice
Permissions
-
PurchaseOrder:Write
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'PUT' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order/00000006/line' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authentication_token}' \
-H 'Content-Type: application/json' \
-d '{
"lineNumber": "0-00000007",
"purchaseOrderID": "00000006",
"itemId": "20040",
"unitID": "KG",
"quantity": 25.000000,
"unitPrice": 15.000000
}'
| Parameter | Data type | Validation | Description |
|---|---|---|---|
| purchaseOrderId | string |
Required |
The id of the purchase order |
Response
{
"id": "00000006",
"purchaseOrderID": "00000006",
"lineNumber": "0-00000007",
"itemID": "20040",
"itemName": null,
"vendorItemID": null,
"variantName": null,
"unitID": "KG",
"unitName": null,
"quantity": 25.000000,
"unitPrice": 15.000000,
"discountAmount": 0,
"discountPercentage": 0,
"taxAmount": 0,
"taxCalculationMethod": 0,
"pictureID": null,
"omniLineID": null,
"omniTransactionID": null
}
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 write purchase order line(s) |
| 400 | Bad Request | Purchase order line could not be updated |
| 404 | Not Found | Purchase order line to be updated was not found |
Delete a purchase order line
Delete an existing purchase orderline.
DELETE /api/inventory/purchase-order/{purchaseOrderId}/line/{lineNumber}
Permissions
-
PurchaseOrder:Write
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'DELETE' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order/00000006/line/0-00000007' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authentication_token}'
| Parameter | Data type | Validation | Description |
|---|---|---|---|
| purchaseOrderId | string |
Required |
The id of the purchase order |
| lineNumber | string |
Required |
Line number of the purchase order line |
Response
HTTP/1.1 204 No Content
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 purchase order line(s) |
| 404 | Not Found | The requested purchase order line was not found |
Post purchase order
Post all lines for a purchase order .
POST /api/inventory/purchase-order/{purchaseOrderId}/post'
Permissions
-
PurchaseOrder:Write
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'POST' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order/00000006/post' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authorization_token}' \
-H 'Content-Type: application/json' \
-d '{}'
Response
{
true
}
Response Codes
| Code | Description |
|---|---|
| true | If purchase order was succesfully posted |
| false | If purchase order was NOT succesfully posted |
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 write purchase order line(s) |
| 400 | Bad Request | Purchase order could not be posted |
Post and receive purchase order
Post and receive purchase order .
POST /api/inventory/purchase-order/{purchaseOrderId}/post-and-receive'
Permissions
-
PurchaseOrder:Write
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'POST' \
'https://lsoneapi.lsretail.com/api/inventory/purchase-order/00000012/post-and-receive' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authorization_token}' \
-H 'Content-Type: application/json' \
-d ''
Response
{
0
}
Response codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Missing unit conversion |
| 2 | Invalid receiving quantity |
| 3 | No lines to post |
| 4 | Already processing |
| 5 | Already posted |
| 6 | Error |
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 write purchase order line(s) |
| 400 | Bad Request | Post and receive could not be synced |