Orders
List orders
The workspace's orders, cancelled ones too, newest first. GET /orders/:id has the lines and domains.
https://api.scaledmail.com/v2/orders- Rate limit
- Read: 300 calls per minute per token
Headers
AuthorizationstringrequiredBearer <your API token>. Tokens start withsm_.live_ WorkspacestringrequiredThe workspace id to act on (from
GET /workspacesor Settings › API tokens). Required on every call except the/workspacescalls; without it:400workspace_.required
Query parameters
limitintegeroptional1 to 100Items per page. Default 25.
cursorstringoptionalThe
next_from the previous page.cursor statusenumoptionalOnly orders with this status.
One of:
pending_paymentprovisioningactivecancellingcancelledfailedtagstringoptionalat most 60 charactersOnly orders with exactly this tag.
created_afterstringoptionalOnly orders placed after this time (
YYYY-MM-DD).
Response (200)
dataobject[]requiredShowHide child fields
idstringrequiredThe order id (
ord_).. . . workspace_idstringrequiredThe workspace the order belongs to (
org_).. . . statusenumrequiredWhere the order is.
provisioning: paid; domains and mailboxes are being set up.active: everything is live.cancelling: ends atcancel_.at cancelled: ended, or our team has already taken it down beforecancel_.at pending_andpayment failedare reserved for later and not sent yet.One of:
pending_paymentprovisioningactivecancellingcancelledfailedtagstringoptionalYour label for the order. Left out if none.
domain_countintegerrequiredDomains of the order, all providers (as listed in the order form;
0until it is sent). A Domain Masking order: its masked domains.recurring_amountnumberrequiredWhat the next renewal bills for this order, after discounts.
0once cancelled.billing_periodobjectrequiredHow the order is billed.
ShowHide child fields
interval_months1 | 3 | 6 | 12requiredMonths one renewal covers: 1, 3, 6 or 12.
next_renewal_atstringoptionalWhen the order renews next (
YYYY-MM-DD). Left out once it is cancelling or cancelled.cancel_atstringoptionalWhen the order ends (
YYYY-MM-DD), the end of the paid period. Only while cancelling.subdomainsstring[] | nullrequiredA subdomain order: the labels set for the whole provider, in order, like
["mail", "team"](mailboxes onmail.,<domain> team.). Providers with different labels: all of them, each once (Google first, then Outlook, then SMTP). A domain that was given its own labels (<domain> domains[].insubdomains POST /orders) is not listed here: read the real subdomains of each domain fromdomains[].insubdomains GET /orders/:id.nullfor a normal order.[]while a subdomain order made in the app still waits for its order form (the labels are chosen there).subdomains_per_domaininteger | nullrequiredSubdomains on every domain of the order, 2 to 5.
nullfor a normal order.created_atstringrequiredWhen the order was placed, as a date:
YYYY-MM-DD(UTC).
has_morebooleanrequiredtruewhen there is another page.next_cursorstring | nullrequiredPass as
cursorto get the next page.nullon the last page.
Responses
- 200OK. Always, also when nothing matches (
data: []). - 400Invalid query. An unknown
status(invalid_), astatus cursorfrom another list (invalid_), or a badcursor limit,tagorcreated_(after invalid_,value paramnames it). - 403Not allowed. The token can't use the workspace in
Workspace(workspace_).not_ allowed - 429Rate limited. More than 300 read calls in a minute with this token (
rate_). Wait for thelimited Retry-Afterseconds.
Like every call, it can also answer 401 (bad key), 400 workspace_, 403 workspace_. See Errors.
