Sales Order GET

URI

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

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

Description

This message enables you to obtain sales orders.

Field Summary:

The writeable fields returned by this message are as described in the sales order POST documentation.

In addition some read-only fields are also returned.

Read-only fields

Field Type Description
createdOn string (ISO date time) The time at which this order was first created.
createdBy integer The ID of the user which first created this order.
updatedOn string (ISO date time) The time at which this order was most recently updated.
total object The total value of the order, broken down into:
  • net - total excluding tax in order currency
  • tax - total tax in order currency
  • gross - total including tax in order currency
  • baseNet - total excluding tax in base currency
  • baseTax - total tax in base currency
  • baseGross - total including tax in base currency
isCanceled Boolean Whether or not the order status is canceled. Null if canceled status is not configured.
orderPaymentStatus string The payment status code of the order. See Payment Status Codes for description.
allocationStatusCode string. 3 chars. The stock allocation status code of the order. See Stock Allocation Codes for description.
shippingStatusCode string. 3 chars. The shipping status code of the order. See Shipping Status Codes for description.

Read-only row fields

Field Type Description
sku string The SKU of the product at the time it was added to the order.
bundleChild boolean Whether or not this row is a child row belonging to a bundle parent row. If true, the ID of the parent row is also provided.
bundleParent boolean Whether or not this row is the parent row of a bundle. The child rows will refer back to this row by its ID.
parentRowId integer If this row is a bundle child, this property is the ID of the row's bundle parent row. Otherwise, it is null.

Code Descriptions

Payment Status Codes Description
PAID The order has been fully paid
PARTIALLY_PAID Payments have been received for the order, but it is not fully paid
UNPAID No payments have been received for the order
AUTHORIZED Payments for this order have been authorized but not received
NOT_APPLICABLE No payment is required for this order
Stock Allocation Codes Description
ANR Allocation Not Required
ANA Allocation None Allocated
APA Allocation Part Allocated
AAA Allocation All Allocated
Shipping Status Codes Description
NST No stock tracked products on order
SNS Stock not shipped
SPS Stock part shipped
ASS All stock shipped

Additional Information

  • This resource cannot be queried with an empty ID set.
  • This resource represents the list of all sales orders. Regardless of how many IDs you request in the ID set and how many sales orders are returned, the HTTP status code will be 2xx (207 if some of the requested sales orders were found, 200 otherwise).
  • Rows on orders are not retrieved in a defined order. The "sequence" property is provided as one of several strategies you can use to sort rows; the currently configured back-office sorting strategy can be seen in the account configuration.

Example

Fetching a sales order

Request URI

/sales-order/1

Response

{
	"response": [
		{
			"id": 20,
			"customer": {
				"id": 200,
				"address": {
					"addressFullName": "John Doe",
					"companyName": "Brightpearl",
					"addressLine1": "First floor",
					"addressLine2": "New Bond House",
					"addressLine3": "Bristol",
					"addressLine4": "near Cabot Circus",
					"postalCode": "BS2 9AG",
					"countryIsoCode": "GB",
					"telephone": "01234 567890",
					"mobileTelephone": "070707070707",
					"email": "john.doe@brightpearl.com"
				}
			},
			"billing": {
				"contactId": 200,
				"address": {
					"addressFullName": "John Doe",
					"companyName": "Brightpearl",
					"addressLine1": "First floor",
					"addressLine2": "New Bond House",
					"addressLine3": "Bristol",
					"addressLine4": "near Cabot Circus",
					"postalCode": "BS2 9AG",
					"countryIsoCode": "GB",
					"telephone": "01234 567890",
					"mobileTelephone": "070707070707",
					"email": "john.doe@brightpearl.com"
				}
			},
			"ref": "Created via sales order POST endpoint",
			"externalRef": "hsdf74-2js7-jdsfi38-73jsd8",
			"placedOn": "2016-09-29T11:12:24.000+01:00",
			"createdOn": "2016-09-29T11:12:24.000+01:00",
			"createdBy": 4,
			"updatedOn": "2016-09-29T11:12:24.000+01:00",
			"taxDate": "2016-06-08T00:00:00.000+01:00",
			"parentId": 0,
			"statusId": 1,
			"warehouseId": 2,
			"channelId": 0,
			"staffOwnerId": 0,
			"projectId": 0,
			"leadSourceId": 0,
			"teamId": 0,
			"priceListId": 2,
			"priceModeCode": "INC",
			"currency": {
				"code": "GBP",
				"exchangeRate": "1.000000",
				"fixedExchangeRate": true
			},
			"delivery": {
				"date": "2016-09-29T11:12:24.000+01:00",
				"address": {
					"addressFullName": "John Doe",
					"companyName": "BrightPearl",
					"addressLine1": "First floor",
					"addressLine2": "New Bond House",
					"addressLine3": "Bristol",
					"addressLine4": "near Cabot Circus",
					"postalCode": "BS2 9AG",
					"countryIsoCode": "GB",
					"telephone": "01234 567890",
					"mobileTelephone": "070707070707",
					"email": "john.doe@brightpearl.com"
				},
				"shippingMethodId": 0
			},
			"rows": [
				{
					"id": 33,
					"productId": 1000,
					"name": "T Shirt",
					"sku": "T00001000",
					"quantity": "1.0000",
					"taxCode": "T20",
					"tax": "10.0000",
					"net": "2.0000",
					"nominalCode": "4000",
					"sequence": 10,
					"bundleChild": false,
					"bundleParent": false
				}
			],
			"total": {
				"net": "10.00",
				"tax": "2.00",
				"gross": "12.00",
				"baseNet": "10.00",
				"baseTax": "2.00",
				"baseGross": "12.00"
			},
			"orderPaymentStatus": "PAID",
			"allocationStatusCode": "ANR",
			"stockStatusCode": "NON",
			"shippingStatusCode": "NST",
			"isCanceled": false,
			"customerId": 200
		}
	]
}