Orders

List orders

The workspace's orders, cancelled ones too, newest first. GET /orders/:id has the lines and domains.

GEThttps://api.scaledmail.com/v2/orders
Rate limit
Read: 300 calls per minute per token

Headers

  • Authorizationstringrequired

    Bearer <your API token>. Tokens start with sm_live_.

  • Workspacestringrequired

    The workspace id to act on (from GET /workspaces or Settings › API tokens). Required on every call except the /workspaces calls; without it: 400 workspace_required.

Query parameters

  • limitintegeroptional1 to 100

    Items per page. Default 25.

  • cursorstringoptional

    The next_cursor from the previous page.

  • statusenumoptional

    Only orders with this status.

    One of: pending_payment provisioning active cancelling cancelled failed

  • tagstringoptionalat most 60 characters

    Only orders with exactly this tag.

  • created_afterstringoptional

    Only orders placed after this time (YYYY-MM-DD).

Response (200)

  • dataobject[]required
    Show child fields
    • idstringrequired

      The order id (ord_...).

    • workspace_idstringrequired

      The workspace the order belongs to (org_...).

    • statusenumrequired

      Where the order is. provisioning: paid; domains and mailboxes are being set up. active: everything is live. cancelling: ends at cancel_at. cancelled: ended, or our team has already taken it down before cancel_at. pending_payment and failed are reserved for later and not sent yet.

      One of: pending_payment provisioning active cancelling cancelled failed

    • tagstringoptional

      Your label for the order. Left out if none.

    • domain_countintegerrequired

      Domains of the order, all providers (as listed in the order form; 0 until it is sent). A Domain Masking order: its masked domains.

    • recurring_amountnumberrequired

      What the next renewal bills for this order, after discounts. 0 once cancelled.

    • billing_periodobjectrequired

      How the order is billed.

      Show child fields
      • interval_months1 | 3 | 6 | 12required

        Months one renewal covers: 1, 3, 6 or 12.

    • next_renewal_atstringoptional

      When the order renews next (YYYY-MM-DD). Left out once it is cancelling or cancelled.

    • cancel_atstringoptional

      When the order ends (YYYY-MM-DD), the end of the paid period. Only while cancelling.

    • subdomainsstring[] | nullrequired

      A subdomain order: the labels set for the whole provider, in order, like ["mail", "team"] (mailboxes on mail.<domain>, team.<domain>). Providers with different labels: all of them, each once (Google first, then Outlook, then SMTP). A domain that was given its own labels (domains[].subdomains in POST /orders) is not listed here: read the real subdomains of each domain from domains[].subdomains in GET /orders/:id. null for 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 | nullrequired

      Subdomains on every domain of the order, 2 to 5. null for a normal order.

    • created_atstringrequired

      When the order was placed, as a date: YYYY-MM-DD (UTC).

  • has_morebooleanrequired

    true when there is another page.

  • next_cursorstring | nullrequired

    Pass as cursor to get the next page. null on the last page.

Responses

  • 200OK. Always, also when nothing matches (data: []).
  • 400Invalid query. An unknown status (invalid_status), a cursor from another list (invalid_cursor), or a bad limit, tag or created_after (invalid_value, param names 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_limited). Wait for the Retry-After seconds.

Like every call, it can also answer 401 (bad key), 400 workspace_required, 403 workspace_not_allowed. See Errors.