Update Purchase Order
PUThttps://sight.inspectorio.com/api/v2-rc-1/purchase-orders/:po_number
Update Purchase Order
Request​
Path Parameters
- application/json
Body
The creation date from the client system of the Purchase Order
2023-02-10
Local Custom ID of the Brand/Retailer organization of the purchase order
client_1
The last updated date from the client system of the Purchase Order
2019-02-20T06:37:18Z
Commit ID of the purchase order
commit_id_1
Commit PO sequence of the purchase order
commit_po_sequence_1
Delivery date or shipment start date of the purchase order
2021-05-23T00:00:00Z
Name of the corresponding event in the client’s system
Event 1
Local Custom ID of the Factory organization of the purchase order
factory_1
In store date of the purchase order
2021-06-01T00:00:00Z
Original purchase order number stored in client's system
opo_1
Purchase order number to be stored in Inspectorio
Possible values: non-empty
po_1
Indicate the source of materials (produced by domestic vendors or imported from vendors outside the country)
domestic
Status of the purchase order
Possible values: [canceled
]
canceled
Purchase order type in a pre-configured list
Possible values: non-empty
po_type_1
Local Custom IDs of the shared organizations of the purchase order
Possible values: non-empty
["sub_org_1"]
Shipment end date of the purchase order
2021-05-30T00:00:00Z
styles object[]required
Unique identifier of the purchase order
abc-def-123-456
Local Custom ID of the Supplier organization of the purchase order
Possible values: non-empty
vendor_1
Responses​
- 200
- 400
- 401
- 422
- 429
- 500
OK
- application/json
- Schema
- Example (auto)
Schema
data object
{
"data": {
"clientCreatedDate": "2023-02-10",
"clientId": "client_1",
"clientName": "Lex Corp",
"clientUpdatedDate": "2019-02-20T06:37:18.048000+00:00",
"commitId": "commit_id_1",
"commitPoSequence": "commit_po_sequence_1",
"createdDate": "2021-06-03T04:30:22.726000+00:00",
"deliveryDate": "2021-09-14T00:00:00+00:00",
"eventName": "Event 1",
"factoryId": "factory_1",
"factoryName": "Padme Corp",
"inStoreDate": "2021-09-19T00:00:00+00:00",
"localClientId": "client_1",
"localClientIds": [
"sub_org_1"
],
"localFactoryId": "factory_1",
"localFactoryIds": [
"sub_org_1"
],
"localSupplierId": "supplier_1",
"localSupplierIds": [
"sub_org_1"
],
"opoNumber": "opo_1",
"poNumber": "po_1",
"poSource": "domestic",
"poStatus": "canceled",
"poType": "po_type_1",
"shareToIds": [
"sub_org_1"
],
"shareToLocalIds": [
"sub_org_1"
],
"shipEndDate": "2021-09-19T00:00:00+00:00",
"styles": [
{
"assortments": [
{
"assortmentId": "string",
"cartonQuantity": 0,
"items": [
{
"brandId": "brand_1",
"brandName": "string",
"classId": "class_id_1",
"color": "string",
"configuration": 0,
"departmentId": "department_id_1",
"id": "string",
"itemId": "string",
"productCategoryId": "product_category_1",
"productCategoryName": "string",
"productLineId": "product_line_1",
"productLineName": "string",
"quantity": 0,
"shipmentTerm": "shipment_term_1",
"size": "string"
}
]
}
],
"solids": [
{
"brandId": "brand_2",
"brandName": "string",
"cartonQuantity": 0,
"casePackQuantity": 0,
"classId": "class_id_1",
"color": "string",
"departmentId": "department_id_1",
"id": "string",
"itemId": "string",
"productCategoryId": "product_category_1",
"productCategoryName": "string",
"productLineId": "product_line_1",
"productLineName": "string",
"quantity": 0,
"shipmentTerm": "shipment_term_1",
"size": "string"
}
],
"styleId": "style_1"
}
],
"uid": "uid",
"updatedDate": "2021-06-03T04:30:22.726000+00:00",
"vendorId": "vendor_1",
"vendorName": "Acme Corp"
}
}
Bad request
- application/json
- Schema
- Example (auto)
Schema
Generic
Bad Request
{
"errorCode": "Generic",
"message": "Bad Request"
}
Unauthorized
- application/json
- Schema
- Example (auto)
Schema
Generic
Cannot retrieve session data because of expired token
{
"errorCode": "Generic",
"message": "Cannot retrieve session data because of expired token"
}
Validation Error
- application/json
- Schema
- Example (auto)
Schema
Generic
{"type":["Input type is not valid"]}
Validation error
{
"errorCode": "Generic",
"errors": {
"type": [
"Input type is not valid"
]
},
"message": "Validation error"
}
Rate-limiting Error
- application/json
- Schema
- Example (auto)
Schema
Generic
Too many requests
{
"errorCode": "Generic",
"message": "Too many requests"
}
Internal Error
- application/json
- Schema
- Example (auto)
Schema
Generic
{"system":["Internal error detail message"]}
Internal server error
{
"errorCode": "Generic",
"errors": {
"system": [
"Internal error detail message"
]
},
"message": "Internal server error"
}
Authorization: apiKey
name: apiKeytype: apiKeyin: header
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X PUT 'https://sight.inspectorio.com/api/v2-rc-1/purchase-orders/:po_number' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'apiKey: <apiKey>' \
-d '{
"clientCreatedDate": "2023-02-10",
"clientId": "client_1",
"clientUpdatedDate": "2019-02-20T06:37:18Z",
"commitId": "commit_id_1",
"commitPoSequence": "commit_po_sequence_1",
"deliveryDate": "2021-05-23T00:00:00Z",
"eventName": "Event 1",
"factoryId": "factory_1",
"inStoreDate": "2021-06-01T00:00:00Z",
"opoNumber": "opo_1",
"poNumber": "po_1",
"poSource": "domestic",
"poStatus": "canceled",
"poType": "po_type_1",
"shareToIds": [
"sub_org_1"
],
"shipEndDate": "2021-05-30T00:00:00Z",
"styles": [
{
"assortments": [
{
"assortmentId": "string",
"cartonQuantity": 0,
"items": [
{
"brandId": "brand_1",
"classId": "class_id_1",
"color": "string",
"configuration": 0,
"departmentId": "department_id_1",
"id": "string",
"itemId": "string",
"productCategoryId": "product_category_1",
"productLineId": "product_line_1",
"shipmentTerm": "shipment_term_1",
"size": "string"
}
]
}
],
"solids": [
{
"brandId": "brand_2",
"cartonQuantity": 0,
"casePackQuantity": 0,
"classId": "class_id_1",
"color": "string",
"departmentId": "department_id_1",
"id": "string",
"itemId": "string",
"productCategoryId": "product_category_1",
"productLineId": "product_line_1",
"quantity": 0,
"shipmentTerm": "shipment_term_1",
"size": "string"
}
],
"styleId": "style_1"
}
],
"uid": "abc-def-123-456",
"vendorId": "vendor_1"
}'