Purchase Payment Total GET

URI

https://{DATACENTER}.brightpearl.com/public-api/{ACCOUNT}
/accounting-service/purchase-payment-total

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

Description

This resource represents the totals for the purchase order ids specified in the url. The total is calculated as follows:

  • amountPaid: amount of RECEIPT and CAPTURE type payments
 - amount of PAYMENT type payments

If you don't specify any IDs no resources will be pulled. The amounts can be negative.

If there are no payments for an order zeroes are returned for the amounts and no paymentCurrency will be in the response.

Note that this resource is restricted to requesting a maximum of 200 IDs at present. As always, this restriction is subject to change and we therefore strongly recommend integrations are built using our corresponding OPTIONS endpoints when requesting large numbers of resources.

Example

Two order ids are provided in this example, the first response element represents the response of an order with at least one payment, the second element is an example of the resource for an order id without payments

Request URI

/purchase-payment-total/59-60

Response

{
	"response": [
		{
			"orderId": 59,
			"paymentCurrency": "GBP",
			"amountPaid": 50.00
		},
		{
			"orderId": 60,
			"amountPaid": 0.00
		}
	]
}