Skip to main content
The /orders resource records purchase transactions in Avalex. An order captures which customer made a purchase, which products were included, the total amount charged, and the IDs of any licenses that were generated as a result. Orders provide an auditable paper trail connecting your customers, products, and licenses in a single record.

Required Permissions


List All Orders

string
required
Bearer <token> or Basic credentials.
Returns an array of all order records in your Avalex account.
Response — 200 OK

Create an Order

string
required
Bearer <token> or Basic credentials.
string
required
ID of the customer placing the order.
string[]
required
Array of product IDs included in this order.
number
required
Total charged amount in your account’s base currency.
string[]
Array of license IDs to associate with this order. These should reference licenses already created via /licenses.
Creates a new order record and returns it with a server-generated ID.
Response — 201 Created

Get an Order by ID

string
required
The unique order ID (e.g. ord_123).
Returns a single order record. Responds with 404 Not Found if no order with that ID exists.
Response — 200 OK

Update an Order

string
required
The unique order ID.
Performs a full replacement of the order record. You must include all fields you want to retain. Returns 404 Not Found if the order does not exist.
This is a full replacement (PUT). Omitted fields — such as licenseIds — will be cleared. Include all existing values you want to keep.
Response — 200 OK

Delete an Order

string
required
The unique order ID.
Permanently removes the order record. Returns 204 No Content on success and 404 Not Found if the ID does not exist.
Response — 204 No Content

Order Schema

Full Schema Example