> ## Documentation Index
> Fetch the complete documentation index at: https://docs.isnap.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List pre-orders

> Lists the pre-orders of your account, newest first, one page at a time.

* **Credential:** an API key.
* **Line-scoped keys:** the list of lines of a [line-scoped key](/authentication#line-scoped-keys) is not applied.
* **Events:** none.
* **Pages:** the response has `items`, `has_more` and `next_cursor`. A cursor that cannot be read restarts the list from the first page with `200`, and the cursor does not carry the `status` filter: see [Listing](/guides/pre-orders#listing) and [Cursors](/pagination#cursors).
* **Secret:** `stripe_client_secret` is `null` on every item: only the `confirm` response returns it.
* **Payment:** the list does not check payments. A pre-order whose first month was just paid can be listed as `awaiting_payment`: read it with [`GET /v1/pre-orders/{id}`](/api-reference/pre-orders/get-pre-order).
* **Caching:** the response carries `Cache-Control: no-store`, whatever its status.

## Errors

| Status | `error.code` | When |
| - | - | - |
| 400 | `validation_failed` | `status` is not `draft`, `awaiting_payment`, `provisioning`, `fulfilled` or `cancelled`, or `limit` is outside 1 to 100. |

The errors that every operation shares are in [Errors](/errors-and-rate-limits#errors).


## OpenAPI

````yaml GET /v1/pre-orders
openapi: 3.0.0
info:
  title: iSnap API
  version: 2.45.0
  description: >-
    The iSnap API sends and receives iMessage, RCS and SMS on real phone lines,
    manages those lines, and reports events through webhooks. Every message is
    sent to a real recipient, with an `isnap_live_` key and with an
    `isnap_test_` key alike. Retry a `429` after `Retry-After` seconds. Retry a
    `500` or a `503` up to 2 times, with exponential backoff. Do not retry any
    other `4xx`: fix the request. Retry a write only on an operation that honors
    `Idempotency-Key`, with the key of the first attempt. Responses carry
    personal data: handles, names and message text.
servers:
  - url: https://api.isnap.ai
security:
  - bearerAuth: []
paths:
  /v1/pre-orders:
    get:
      summary: List pre-orders
      description: >-
        Lists the pre-orders of the account, newest first. Accepts an API key; a
        line-scoped key lists them all. Filter with `status`. The cursor does
        not carry the filter: send the same `status` on every page. Stop when
        `has_more` is `false`: `next_cursor` is then `null`. An unreadable
        `cursor` restarts from the first page, without an error. A restart is
        silent: when a page contains an id you already have, the list restarted.
      parameters:
        - schema:
            type: string
            enum:
              - draft
              - awaiting_payment
              - provisioning
              - fulfilled
              - cancelled
            description: Keep the pre-orders in this status.
          required: false
          description: Keep the pre-orders in this status.
          name: status
          in: query
        - schema:
            type: string
            description: >-
              The `next_cursor` of the previous page. Omit it for the first
              page. An unreadable cursor restarts from the first page, without
              an error.
          required: false
          description: >-
            The `next_cursor` of the previous page. Omit it for the first page.
            An unreadable cursor restarts from the first page, without an error.
          name: cursor
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
            description: 'Number of pre-orders per page, from 1 to 100. Default: 25.'
          required: false
          description: 'Number of pre-orders per page, from 1 to 100. Default: 25.'
          name: limit
          in: query
      responses:
        '200':
          description: One page of pre-orders.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreOrderList'
        '400':
          description: >-
            Invalid request. `error.code` is `validation_failed` when a
            parameter, a header or the body does not match its schema:
            `error.issues` then lists each problem.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: No valid credential. `error.code` is `unauthorized`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: >-
            Too many requests. `error.code` is `rate_limit_exceeded` when more
            than 100 requests came from the same network address in 60 seconds,
            whatever their API key or account: wait `error.retry_after` seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '500':
          description: >-
            Unexpected failure. `error.code` is `internal_error`. An operation
            that takes a JSON body also returns it when the body, sent as
            `application/json`, is not valid JSON. Quote `trace_id` when you
            report it to iSnap.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - bearerAuth: []
components:
  schemas:
    PreOrderList:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
          description: Always `true` on a success response.
        data:
          type: object
          properties:
            items:
              type: array
              items:
                $ref: '#/components/schemas/PreOrder'
              description: Pre-orders, newest first.
            has_more:
              type: boolean
              description: '`true` when another page exists.'
            next_cursor:
              type: string
              nullable: true
              description: >-
                Cursor of the next page when `has_more` is `true`, otherwise
                `null`. Send it as `cursor`.
          required:
            - items
            - has_more
            - next_cursor
          description: One page of pre-orders.
        trace_id:
          type: string
          description: >-
            Trace id of the request that produced this response: 32 lowercase
            hexadecimal characters. Quote it when you report a problem to iSnap.
        request_id:
          type: string
          description: >-
            Id of the request that produced this response: `req_` followed by 25
            letters or digits.
      required:
        - success
        - data
        - trace_id
        - request_id
    ErrorEnvelope:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
          description: Always `false` on an error response.
        data:
          nullable: true
          description: Always `null` on an error response.
        error:
          type: object
          properties:
            status:
              type: integer
              description: The HTTP status of the response.
            code:
              type: string
              description: >-
                Stable machine-readable code that names the refusal. Branch on
                this value.
            message:
              type: string
              description: >-
                Text for a person. It can change between versions: do not branch
                on it.
            retry_after:
              type: integer
              nullable: true
              description: >-
                Seconds to wait before the next attempt. Set on the `429`
                responses that know a delay, where the `Retry-After` header
                carries the same value. When it is above 60 seconds, do not wait
                in a request: schedule the call, or report the time. `null` on
                every other error.
            retry_at:
              type: string
              nullable: true
              description: >-
                ISO 8601 timestamp at which the refusal ends. Set only on `429
                rebind_cap_reached`. `null` on every other error.
            issues:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  path:
                    type: array
                    items:
                      anyOf:
                        - type: string
                        - type: number
                    description: >-
                      Where the problem is: the field names and array indexes
                      that lead to it.
                  message:
                    type: string
                    description: Text for a person.
                  code:
                    type: string
                    description: >-
                      Kind of problem. On `validation_failed`, for example
                      `invalid_type`, `invalid_value`, `invalid_format`,
                      `invalid_union`, `invalid_key`, `invalid_element`,
                      `too_small`, `too_big`, `not_multiple_of`,
                      `unrecognized_keys` or `custom`. The list is open: read
                      `path` and `message`.
                  min:
                    type: integer
                    description: >-
                      Smallest accepted value. Present only on
                      `limit_out_of_bounds`, `mac_quantity_not_a_pack`,
                      `byop_reduction_strands_mac_sessions` and
                      `byop_reduction_strands_byod_lines`.
                  max:
                    type: integer
                    description: >-
                      Largest accepted value. Present only on
                      `limit_out_of_bounds` and
                      `mac_sessions_exceed_byop_lines`, and on the `too_big`
                      issue of an `Idempotency-Key` header longer than 255
                      characters.
                required:
                  - path
                  - message
                  - code
              description: >-
                Problems found in the request, one entry each. Set on most `400
                validation_failed` responses and on the refusals that name a
                field: a refused `handle` of `POST /v1/lookup` has `issues:
                null`. `null` on every other error.
          required:
            - status
            - code
            - message
            - retry_after
            - retry_at
            - issues
          description: >-
            What went wrong. The six fields are always present; `retry_after`,
            `retry_at` and `issues` are `null` when they do not apply.
        trace_id:
          type: string
          description: >-
            Trace id of the request that produced this response: 32 lowercase
            hexadecimal characters. Quote it when you report a problem to iSnap.
        request_id:
          type: string
          description: >-
            Id of the request that produced this response: `req_` followed by 25
            letters or digits.
      required:
        - success
        - data
        - error
        - trace_id
        - request_id
      description: The body of an error response.
    PreOrder:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: 'Id of the pre-order: a UUID.'
        preferred_area_codes:
          type: array
          items:
            type: string
          description: The area codes you listed, in order of preference.
        inbound_only:
          type: boolean
          description: '`true` for an inbound-only line, `false` for a two-way line.'
        billing_anchor_at:
          type: string
          nullable: true
          description: >-
            The billing anchor you set when creating the pre-order, carried onto
            the line when the line is created. `null` when you set none.
        status:
          $ref: '#/components/schemas/PreOrderStatus'
        stripe_client_secret:
          type: string
          nullable: true
          description: >-
            Client secret for the payment form of Stripe, to collect the first
            month. Set only in the response of `POST
            /v1/pre-orders/{id}/confirm`, when that response carries the
            pre-order in status `awaiting_payment`: the first time and every
            time confirm is repeated. `null` in every other response.
        estimated_fulfillment:
          type: string
          nullable: true
          description: >-
            Estimated time of the hand-over of the line: the time the build
            starts plus 72 hours. Set once, when the build starts, and never
            revised. `null` while the pre-order is `draft` or
            `awaiting_payment`, and on a pre-order canceled before its build
            started.
        device_status:
          $ref: '#/components/schemas/DeviceFulfillmentStatus'
        created_at:
          type: string
          description: Timestamp of creation, ISO 8601 in UTC.
        updated_at:
          type: string
          description: Timestamp of the last change of the pre-order, ISO 8601 in UTC.
        metadata:
          type: object
          nullable: true
          additionalProperties:
            nullable: true
          description: >-
            Your metadata on the pre-order, set at creation or with `PATCH
            /v1/pre-orders/{id}`, and sent as `data.metadata` on every
            `pre_order.*` event. `null` when the pre-order has none. It is not
            copied onto the line that the pre-order produces.
          example:
            crm_account_id: acc_123
      required:
        - id
        - preferred_area_codes
        - inbound_only
        - billing_anchor_at
        - status
        - stripe_client_secret
        - estimated_fulfillment
        - created_at
        - updated_at
        - metadata
      description: 'A pre-order: an order for one rented iMessage line.'
    PreOrderStatus:
      type: string
      enum:
        - draft
        - awaiting_payment
        - provisioning
        - fulfilled
        - cancelled
      description: >-
        `draft`: created, with no effect. `awaiting_payment`: confirmed by a
        direct account, and the first month is due; nothing is built until it is
        paid. `provisioning`: the build has started, and the line is being
        prepared. `fulfilled`: the line is handed over. `cancelled`: the
        pre-order ended with no line. You canceled it, its first month was not
        paid within 23 hours of the confirmation, or its subscription was
        canceled before the first payment. A pre-order whose build has started
        never becomes `cancelled`.
    DeviceFulfillmentStatus:
      type: string
      nullable: true
      enum:
        - awaiting_hardware
        - received
        - setup_in_progress
        - ready
        - deployed
        - null
      description: >-
        Progress of the line. `awaiting_hardware`: the line is not ready; also
        the value of a pre-order that has no line: a draft, a pre-order in
        `awaiting_payment`, a canceled pre-order. `ready`: the line is prepared.
        `deployed`: the line is handed over. `received` and `setup_in_progress`
        are declared and never returned. Always present on a pre-order, and
        never `null`.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key created in the iSnap dashboard, or a trial key, sent as
        `Authorization: Bearer <key>`. An API key starts with `isnap_live_` or
        `isnap_test_`; both act on the same account, lines and billing. A trial
        key acts on its trial only.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.