<Intro>

<EndpointHeader />

<Description>

Returns your workspace's number orders, newest first. Filter by status to find in-progress or failed orders.

</Description>

</Intro>

<Parameters in="query">

<Parameter name="status" type="string">

<Description>

Return only orders with status `charging`, `ordering`, `pending`, `completed`, or `failed`.

</Description>

<Description>

Possible values (may grow over time): `charging`, `ordering`, `pending`, `completed`, `failed`

</Description>

</Parameter>

<Parameter name="limit" type="integer">

<Description>

Maximum number of items to return per page.

</Description>

</Parameter>

<Parameter name="starting_after" type="string">

<Description>

Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.

</Description>

</Parameter>

<Parameter name="ending_before" type="string">

<Description>

Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.

</Description>

</Parameter>

</Parameters>

<Payload kind="response">

<Field name="data" type="array of object" required>

<FieldChildren kind="response">

<Field name="id" type="string" prefix="data." required>

<Description>

Identifier of this purchase order.

</Description>

</Field>

<Field name="number" type="string" prefix="data." required>

<Description>

The number being acquired, in E.164 format.

</Description>

</Field>

<Field name="country_code" type="string" prefix="data." required />

<Field name="number_type" type="string" prefix="data." required>

<Description>

Physical type of the number being acquired.

</Description>

</Field>

<Field name="status" type="string" prefix="data." required />

<Field name="number_id" type="nullable string" prefix="data.">

<Description>

Identifier of the number this order produced, set when `status` is `completed`. Pass it as `number_id` to `GET /v1/numbers/{number_id}` or `DELETE /v1/numbers/{number_id}`. `null` until the order completes.

</Description>

</Field>

<Field name="failure_reason" type="nullable string" prefix="data.">

<Description>

Human-readable reason the purchase failed. `null` unless status is failed. An order can fail some time after it was created, so `updated_at` tells you when the failure was recorded rather than when the order was placed.

</Description>

</Field>

<Field name="completed_at" type="nullable string" prefix="data.">

<Description>

When the purchase completed and the number became owned (status completed). `null` for orders still in progress or failed.

</Description>

</Field>

<Field name="created_at" type="string" prefix="data." required />

<Field name="updated_at" type="string" prefix="data." required />

</FieldChildren>

</Field>

<Field name="next_cursor" type="nullable string" required>

<Description>

Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.

</Description>

</Field>

<Field name="prev_cursor" type="nullable string" required>

<Description>

Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.

</Description>

</Field>

<Field name="refresh_cursor" type="nullable string" required>

<Description>

Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.

</Description>

</Field>

</Payload>