- Utilities
-
Accounting
- Accounting Period
- Accounting Period Lock
- All transaction statement
- Contact balance
- Currency
- Customer Payment
- Exchange Rate
- Journal
- Journal Entry
- Nominal Code
- Payment Method
- Purchase Credit
- Purchase Invoice
- Purchase Payment
- Purchase Payment Total
- Sale Payment Total
- Sales Credit
- Sales Invoice
- Sales Receipt
- Sales Receipt (deprecated)
- Supplier Payment
- Tax Code
- Contact
- Integration
-
Order
- Custom Field Metadata
- Forget Contact
- Landed Cost Estimate
- Order
- Order Acknowledgement
- Custom Field
- Order Note
- Order Row
- Order Shipping Status
- Order Status
- Order Status Update
- Order Stock Status
- Order Type
- Purchase Credit Close
- Purchase Order Close
- Sales Credit
- Sales Credit Close
- Sales Order
- Sales Order Close
- Sales Order Row
- Pricing
-
Product
- Brand
- Brightpearl Category
- Channel
- Channel brand
- Collection
- Discount contact usage
- Discount total usage
- Option
- Option Value
- Price List
- Product Primary Supplier
- Product
- Product Bundle
- Product Custom Field
- Custom Field Metadata
- Custom Field
- Product Group
- Product Identity
- Product option value
- Product Price
- Product Supplier
- Product Type
- Product Type Option Association
- Season
-
Warehouse
- Asset Value Correction
- Bundle Availability
- Default Location
- Drop-Ship Note
- Drop-Ship Note Event
- External Transfer
- Fulfilment Source
- Order fulfilment status
- Goods-In Note Correction
- Goods-In Note
- Goods Movement
- Goods-Out Note
- Goods-Out Note Event
- Internal Transfer
- Location
- Pick
- Product Availability
- Quarantine Location
- Quarantine Release
- Reservation
- Reservation Row
- Reservations
- Shipping Method
- Stock Correction
- Stock Transfer
- Warehouse
- Warehouse Defaults
- Zone
Purchase Credit Close POST
URI
https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/order-service/purchase-credit/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 one purchase credit. By this, the credit will be set to an "invoice pending" state (credit's invoice number set to "pending"). In this state, credits should not be modified (they are uneditable in the UI, but there is currently no protection against modification within the order service).
Once the purchase credit is in "invoice pending" state, the accounting service will be asked to start invoicing. If this operation is successful, the credit will receive its invoice reference, no longer be pending, and regarded as "closed".
If downstream invoicing of a credit in state "invoice pending" fails, this will not change the "pending" state of the credit, and it is allowed to call this endpoint again to retry the process. POST Purchase Credit Close of an invoiced credit will be rejected, however.
Even if the json representation of the credit close resource has an array for the order id that is just for future extension and at the moment this endpoint will accept only exactly one order id.
Example
Closing one purchase credit with no provided exchange rate
Request URI
/purchase-credit/close
Request body
{
"invoiceReference": "REF",
"orderIds": [
1029
]
}
Response
{
}