Order Row PATCH
URI
https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/order-service/order/{ORDER-ID}/row/{ORDER-ROW-ID}
Refer to our documentation on URI syntax for more information on how to construct URIs.
Description
Use order row PATCH to update individual fields of existing order rows while leaving the
rest as they were. Refer to our
An order row may not be PATCHed if it belongs to an order which has been invoiced.
Not all order row fields can be updated. The following table lists the mutable fields and any restrictions:
Field | Description | Path (JSON pointer) | Data type | Notes |
---|---|---|---|---|
Quantity | Number of items on this row. | /quantity/magnitude | Numeric (up to 4 d.p.) |
|
Row net value | The net value of this row. | /rowValue/rowNet/value | Numeric (up to 4 d.p.) |
|
Row tax value | The tax value of this row. | /rowValue/rowTax/value | Numeric (up to 4 d.p.) |
|
Nominal code | The nominal code of this row. | /nominalCode | Numeric (4 digits) |
|
Tax calculator code | A code specifying the tax calculation method to be used on this row (defaults to "brightpearl"). | /rowValue/taxCalculator | String |
|
Order row sequence | Order rows are positioned in ascending sequence number order. | /orderRowSequence | Numeric |
|
The response to a successful request will be the new state of the order row.
Example
Updating order row 98 of order 45, set net to 19.80 and tax to 2.60
Request URI
/order/45/row/98
Request body
[
{
"op": "replace",
"path": "/rowValue/rowNet/value",
"value": "100.00"
},
{
"op": "replace",
"path": "/rowValue/rowTax/value",
"value": "20.00"
},
{
"op": "replace",
"path": "/orderRowSequence",
"value": "10"
}
]
Response
{
"response": {
"orderRowSequence": "10",
"productId": 3112,
"productName": "Sunglasses",
"productSku": "Add-Sun",
"quantity": {
"magnitude": "1.0000"
},
"itemCost": {
"currencyCode": "GBP",
"value": "10.0000"
},
"rowValue": {
"taxRate": "20.0000",
"taxCode": "T20",
"taxCalculator": "brightpearl",
"rowNet": {
"currencyCode": "GBP",
"value": "100.0000"
},
"rowTax": {
"currencyCode": "GBP",
"value": "20.0000"
}
},
"nominalCode": "4000",
"composition": {
"bundleParent": false,
"bundleChild": false,
"parentOrderRowId": 0
}
}
}