Sales Order Close POST

URI

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

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

Description

POST to this endpoint to start the invoicing process of a sales order. By this, the order will be set to an "invoice pending" state (order's invoice number set to "pending"). In this state, orders should not be modified (they are uneditable in the UI, but there is currently no protection against modification within the order service).

Once the order is in "invoice pending" state, the accounting service will be asked to start invoicing. If this operation is successful, the order will receive its invoice reference, no longer be pending, and regarded as "closed".

If downstream invoicing of an order in state "invoice pending" fails, this will not change the "pending" state of the order, and it is allowed to call this endpoint again to retry the process. POST Sales Order Close of an invoiced order will be rejected, however.

Field Description Data Type Required
taxDate If specified, this date will override the usual invoice tax date rules, e.g. the 'use today for tax date' setting. String (ISO 8601 date time) No

Example 1

Closing sales order 1029.

Request URI

/sales-order/1029/close

Request body

{
}

Response

{
}

Example 2

Closing sales order 1029 with an overriding tax date.

Request URI

/sales-order/1029/close

Request body

{
	"taxDate": "2017-03-27T00:00:00.000Z"
}

Response

{
}