Skip to content
API · Orders

Orders and their status

Read your store's orders and check the delivery status of each one.

List orders

GET /api/v1/external/orders

Returns the tenant's orders, paginated, with optional filters. Requires scope orders:read.

Query parameters

ParameterTypeDescription
statusenumPENDING, PROCESSING, COMPLETED, FAILED, REFUNDED, CANCELLED.
userIdUUIDFilter by customer id.
productIdUUIDFilter by product.
variationIdUUIDFilter by variation.
dateFromISO 8601Minimum date (inclusive).
dateToISO 8601Maximum date (exclusive).
pageintPage (default 1).
limitintPage size (default 20, max 100).

Request

curl "https://api.nuvlyx.com/api/v1/external/orders?status=COMPLETED&limit=10" \
  -H "Authorization: Bearer nvl_live_YOUR_TOKEN"

Get an order

GET /api/v1/external/orders/:id

Returns a single order with all its items, post-sale instructions and, if delivered, decrypted license credentials. Requires scope orders:read.

Security: credentials are only sent over HTTPS and never appear in logs. Treat the response as sensitive data.

Create an order

POST /api/v1/external/orders

Creates an order on behalf of a customer. The customer is identified by customerId or customerPhone (E.164, must be linked via the storefront's profile). Requires scope orders:write.

Payment: the customer's wallet. If the balance is not enough for the total, the API responds 400 with a clear message — top up the wallet first via POST /external/customers/:id/wallet/recharge and retry.

Body

FieldTypeDescription
customerIdUUIDCustomer UUID. Mutually exclusive with customerPhone.
customerPhoneE.164Customer's linked phone. Mutually exclusive with customerId.
itemsarrayList of { variationId }. Repeat the same variationId N times for quantity N. Max 20.
notesstringInternal notes (optional).

Request

curl -X POST https://api.nuvlyx.com/api/v1/external/orders \
  -H "Authorization: Bearer nvl_live_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "customerPhone": "+573001234567",
    "items": [
      { "variationId": "abc12345-…" },
      { "variationId": "abc12345-…" }
    ]
  }'

Errors

  • 400 — Insufficient balance, out of stock, or missing customerId/customerPhone.
  • 403 — Token missing the orders:write scope.
  • 404 — Customer not found or phone not linked.