Skip to main content

Steps

Creating an approved Order is done through three distinct calls:
1

Create a new Purchase

2

Create a Commitment

3

Trigger the approval workflow

The order will eventually be created once the approval workflow succeeds, which corresponds to approving the purchase request.

1. Create a new Purchase

Success is indicated by a 201 response status code. If so, the response contains a purchaseId which is the identifier of the created Purchase object.
File upload is done via the upload API of our file management system (lucca-files). Please refer to the dedicated documentation.

2. Create a Commitment

Pleas note a Commitment can be of type “one-time” (i.e. OneTimeCommitment) or “recurring” (i.e. SubscriptionCommitment). In which case the payload changes slightly.
You may retrieve a list of all VAT rates applicable to a given territory at a given date via the tax management service. You will need it to set up the correct VAT rate when creating a Commitment.
Success is indicated by a 201 response status code. If so, the response contains a commitmentId which is the identifier of the created Commitment object.

3. Trigger the approval workflow

The request body is expected to be empty.
The system will configure auto-approval of requests so that the order is automatically created at the end of the workflow.

Addendum

You may need to cancel or delete a Purchase that was previously created.Please note that strictly speaking, a Purchase cannot be deleted (HTTP DELETE requests are not supported), but it can be “closed”. A Purchase may only be closed once all invoices related to it have been approved and paid (or just cancelled).