Sales Credit GET

URI

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

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

Description

This message is used to obtain sales credits.

Field Summary:

The writeable fields returned by this message are as described in the sales credit 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 credit was first created.
createdBy integer The ID of the user which first created this credit.
updatedOn string (ISO date time) The time at which this credit 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 credit.
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 credits. Regardless of how many IDs you request in the ID set and how many sales credits are returned, the HTTP status code will be 2xx (207 if some of the requested sales credits 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 credit

Request URI

/sales-credit/1

Response

{
	"response": [
		{
			"id": 23,
			"version": 5,
			"customerId": 200,
			"ref": "Created via sales credit POST endpoint",
			"externalRef": "hsdf74-2js7-jdsfi38-73jsd8",
			"placedOn": "2016-09-29T11:12:24.000+01:00",
			"taxDate": "2016-06-08T00:00:00.000+01:00",
			"createdOn": "2016-09-29T11:12:24.000+01:00",
			"createdBy": 4,
			"updatedOn": "2016-09-29T11:12:24.000+01:00",
			"parentId": 20,
			"statusId": 10,
			"warehouseId": 2,
			"channelId": 1,
			"staffOwnerId": 0,
			"projectId": 0,
			"leadSourceId": 0,
			"teamId": 0,
			"priceListId": 1,
			"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": 38,
					"productId": 1000,
					"name": "Shipping",
					"sku": "T00001000",
					"quantity": "1.0000",
					"taxCode": "T20",
					"tax": "10.0000",
					"net": "20.0000",
					"nominalCode": "4000",
					"externalRef": "fsd639sdf-sdf7w3hsdf-2w347sdhf",
					"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
		}
	]
}