Sale Payment Total GET

URI

https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/accounting-service/sale-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 sale order ids specified in the url. The totals ar calculated as follows:

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

  • amountAuthorized: authorized amount of AUTH type payments
 - authorized amount of VOID type payments

  • amountCaptured: sum of CAPTURE 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.

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

/sale-payment-total/56-57

Response

{
	"response": [
		{
			"orderId": 56,
			"paymentCurrency": "GBP",
			"amountPaid": 50.00,
			"amountAuthorized": 10.00,
			"amountCaptured": 5.00
		},
		{
			"orderId": 57,
			"amountPaid": 0.00,
			"amountAuthorized": 0.00,
			"amountCaptured": 0.00
		}
	]
}