Purchase Orders API

Get access to your purchase orders data through Cloudbox's v1 API.

Retrieving Purchase Orders

Purchase orders with their lines and receiving history.

Use GET /api/v1/purchase-orders to page through every record in your organization, or GET /api/v1/purchase-orders/{id} to fetch a single record with its related data. The id is a UUID, and a 404 means it doesn't exist in your organization.

API Endpoint

GET
/api/v1/purchase-orders
GET
/api/v1/purchase-orders/{id}

Required Headers

Every request must include the following:

Header Key
Description
org-api-key
Your Organization API key. Contact Cloudbox Support For Access: support@cloudboxapp.com.
user-api-key
Your User API Key

Requests missing either header will return 401 Unauthorized

Example Request

bash curl -X GET "https://app.cloudboxapp.com/api/v1/purchase-orders?limit=100" \ -H "org-api-key: YOUR_ORG_API_KEY" \ -H "user-api-key: YOUR_USER_API_KEY" \ -H "Accept: application/json"

Response Schema

Column
Type
Description
id
string (uuid)
Unique ID
po_number
string, nullable
Filterable (exact). Sortable
status
string, nullable
Filterable (exact)
date
string (YYYY-MM-DD), nullable
Sortable
expected_on
string (YYYY-MM-DD), nullable
vendor_id
string (uuid), nullable
References Vendors. Filterable (exact)
vendor_location_id
string (uuid), nullable
References VendorLocations
vendor_contact_id
string (uuid), nullable
References VendorContacts
description
string, nullable
currency
string, nullable
payment_terms
string, nullable
ship_via
string, nullable
shipping_terms
string, nullable
tracking_number
string, nullable
subtotal
number, nullable
freight_total
number, nullable
tax_total
number, nullable
total
number, nullable
integration_ref
string, nullable
created_at
string (ISO 8601), nullable
Creation timestamp (UTC). Sortable
updated_at
string (ISO 8601), nullable
Last update timestamp (UTC). Sortable
vendor
object
Detail endpoint only. Related record: id, name, vendor_code
lines
array of objects
Detail endpoint only. Related records: id, line_number, sku_id, line_description, uom, quantity, unit_price, amount, expected_on, received_qty, received_on
receipts
array of objects
Detail endpoint only. Related records: id, received_by, line_count, total_qty, notes, created_at, lines

Filters

limitPage size (default 100, max 1000)
offsetNumber of records to skip (default 0)
sortOne of: date, po_number, created_at, updated_at
orderasc | desc
statusPO status
vendor_idPOs for this vendor
po_numberExact PO number match
date_fromPO date on or after (YYYY-MM-DD)
date_toPO date on or before (YYYY-MM-DD)
updated_sinceOnly records updated at or after this ISO 8601 timestamp
default sortcreated_at descending

Errors

Cloudbox uses standard HTTP status codes to indicate API success or failure:

  • 200–299 – Request succeeded
  • 400 – Bad request (missing parameters, invalid values)
  • 401 – Unauthorized (missing or invalid API keys)
  • 404 – Resource not found
  • 429 – Too many requests (rate limited)