Sales Order Row PUT
URI
https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/order-service/sales-order/{ORDER-ID}/row/{ID-SET}
Refer to our documentation on URI syntax for more information on how to construct URIs.
Description
This message enables you to update one or more sales order rows of a given order.
Field Summary:
Field | Description | Data Type | Required | Values |
---|---|---|---|---|
id | The ID of the row you are updating, it needs to match one of the IDs in the id set in the url | String | True | |
productId | The ID of the product you wish to add to the order. | int | If name not supplied | |
name | The name of the product or description of the row. | String | If productId not supplied | |
quantity | The quantity of items in this row. | String | True | Must be an integer for stock-tracked product or bundle rows. Can be up to 4dp otherwise. |
taxCode | The tax code for this row. | String | True | |
net | The net value of this row (quantity * price). | String | True | Max precision of 4dp. |
tax | The tax value of all items in this row. | String | True | Max precision of 4dp. |
Example 1
Updating 2 sales order rows in an order.
Request URI
/sales-order/1/row/1,3
Request body
[
{
"id": 3,
"productId": 1001,
"name": "A product name",
"quantity": "1",
"taxCode": "T20",
"tax": "8.8000",
"net": "44.0000"
},
{
"id": 1,
"name": "Another product name",
"quantity": "3",
"taxCode": "T4",
"tax": "2",
"net": "50.0000"
}
]
Response
{
"response": {
"resourceStatuses": {
"1": 200,
"3": 200
},
"resourceErrors": {
"1": [
],
"3": [
]
}
}
}
Example 2
400 Error response.
Request URI
/sales-order/1/row/3
Request body
[
{
"id": 3,
"productId": 1001,
"name": "A product name",
"quantity": "WRONG",
"taxCode": "T20",
"tax": "8.8000",
"net": "44.0000"
}
]
Response
{
"errors": [
{
"code": "ORDC-024",
"message": "Cannot update order row: 1.You have supplied an invalid quantity: WRONG for row 0"
}
]
}