Order Row POST

URI

https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/order-service/order/{ORDER-ID}/row

Refer to our documentation on URI syntax for more information on how to construct URIs.

Description

This message enables you to add order rows to an existing order.
The response of the order row POST is the ID of the order row in your Brightpearl system.

Products

There are two ways to specify what items belong to an order row:
  • A product row is created by supplying the ID of an existing Brightpearl product. Doing this will add the product's name to the order row and cause the stock levels of these products to be updated when the order is allocated or fulfilled.
  • A free text row is created by supplying a product name or some descriptive text but no product ID.
If you supply both a product ID and a product name then the supplied name will override the product's name. You must supply at least one of these fields.

Bundles

A product bundle cannot be added to a purchase order or purchase credit. When adding a product bundle simply POST a single order row using the bundle's product ID. Brightpearl will automatically create additional rows for each component of the bundle. Only the ID of the bundle's root row and not the component rows will be returned if successful.

Fields

Field Description Required Notes
productId The ID of the product you wish to add to the order. If productName not supplied
productName The name of the product or description of the row. If productId not supplied
magnitude The quantity of items in this row. 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. True
rowNet The net value of this row. If using a net value Max precision of 2dp.
rowTax The tax value of this row. If using a net value Max precision of 2dp.
nominalCode The nominal code for this row.
If you do not provide a nominal code, then the following rules will be used to determine which nominal code will be applied to the row
    For sales order
  1. The nominal code associated to the contact will be used
  2. If the contact does not have a nominal code, the nominal code associated with the product will be used
  3. If the product does not have a nominal code or it is not a Brightpearl product the default sales nominal code is used
    For purchase order
  1. If the product a Brightpearl product and Cost of Sales is on, the product stock nominal code will be used
  2. If order is Drop ship or Cost of Sales is off, the contact nominal code will be used
  3. If Cost of Sales is on and product is not a Brightpearl product, the contact nominal code will be used
  4. If the contact does not have a nominal code, the product purchase nominal code will be used
  5. If the product does not have a nominal code, the default purchases nominal code is used
False

Example 1

Creating a new order row on order 45. This row is a product row.

Request URI

/order/45/row

Request body

{
	"productId": 1202,
	"quantity": {
		"magnitude": "12"
	},
	"rowValue": {
		"taxCode": "T20",
		"rowNet": {
			"value": "12.21"
		},
		"rowTax": {
			"value": "2.44"
		}
	},
	"nominalCode": "4000"
}

Response

{
	"response": 55
}

Example 2

Creating a new Order Row on Order 55. This row is a free text row.

Request URI

/order/55/row

Request body

{
	"productName": "Labour",
	"quantity": {
		"magnitude": "15.50"
	},
	"rowValue": {
		"taxCode": "T0",
		"rowNet": {
			"value": "10"
		},
		"rowTax": {
			"value": "0.00"
		}
	},
	"nominalCode": "4000"
}

Response

{
	"response": 60
}