---
title: "One invoice, optionally waiting for its outcome"
description: "`status` is `processing` until SUNAT answers; `settled` says whether anything more will happen by itself, and `what_next` what to do. With `wait`, the call holds until the invoice leaves `processing` or the seconds run out, and answers the invoice as it is either way. `template` says which template and version its PDF prints with (`kind`, `ref`, `template_id`, `name`, `version`), fixed at emission. `customer` carries, besides `id`, `id_type`, `id_number` and `name`, its `email` (where the invoice is sent) and `address` (what it prints) as the invoice froze them when it was issued, not the customer as it is now; each `null` when it was issued without it. Only this read carries them: the rows of GET /v1/invoices, the answer of POST /v1/invoices, the events and the webhooks carry no address of the customer."
---

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

Path: Invox API › Invoices

`GET /v1/invoices/{id}`

`status` is `processing` until SUNAT answers; `settled` says whether anything more will happen by itself, and `what_next` what to do. With `wait`, the call holds until the invoice leaves `processing` or the seconds run out, and answers the invoice as it is either way. `template` says which template and version its PDF prints with (`kind`, `ref`, `template_id`, `name`, `version`), fixed at emission. `customer` carries, besides `id`, `id_type`, `id_number` and `name`, its `email` (where the invoice is sent) and `address` (what it prints) as the invoice froze them when it was issued, not the customer as it is now; each `null` when it was issued without it. Only this read carries them: the rows of GET /v1/invoices, the answer of POST /v1/invoices, the events and the webhooks carry no address of the customer.

## Authentication

- `bearer`, http, header `Authorization`

## Path parameters

- `id` (`get-invoices-by-id.path.id`; string, required)
  - format `uuid`; pattern `^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$`

## Query parameters

- `wait` (`get-invoices-by-id.query.wait`; integer, optional) — Seconds to wait for the outcome before answering.
  - min 0; max 20; default `0`

## Header parameters

- `X-Organization` (`get-invoices-by-id.header.X-Organization`; string, optional) — Required with a person's access token: the organization to act on. Omit it with a service-account key.
  - format `uuid`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.invox.page/v1/invoices/<id>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.invox.page/v1/invoices/<id>';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.invox.page/v1/invoices/<id>"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The invoice.

#### Example

```json
{
  "id": "string",
  "object": "invoice",
  "environment": "live",
  "type": "factura",
  "series": "string",
  "number": -9007199254740991,
  "full_number": "string",
  "status": "processing",
  "settled": true,
  "next_step": {
    "action": "send_to_provider",
    "attempt": -9007199254740991,
    "scheduled_at": "string",
    "can_advance": true
  },
  "status_reason": "string",
  "held": {
    "since": "string",
    "reason_code": "provider_response_unrecognized",
    "what_next": "string"
  },
  "what_next": "string",
  "sunat": {
    "status": "accepted",
    "code": "string",
    "third_party_text": {
      "source": "sunat",
      "message": "string"
    }
  },
  "issue_date": "string",
  "establishment": {
    "code": "string",
    "name": "string"
  },
  "template": {
    "kind": "version",
    "ref": "string",
    "template_version_id": "string",
    "template_id": "string",
    "name": "string",
    "version": -9007199254740991
  },
  "currency": "string",
  "totals": {
    "taxable": "string",
    "exempt": "string",
    "unaffected": "string",
    "tax": "string",
    "total": "string"
  },
  "customer": {
    "id": "string",
    "id_type": "string",
    "id_number": "string",
    "name": "string",
    "email": "string",
    "address": "string"
  },
  "items": [
    {
      "description": "string",
      "code": "string",
      "quantity": "string",
      "unit": "string",
      "unit_value": "string",
      "unit_price": "string",
      "tax_code": "string",
      "subtotal": "string",
      "tax": "string",
      "total": "string"
    }
  ],
  "notes": "string",
  "hash": "string",
  "provider": "simulator",
  "attempt": -9007199254740991,
  "previous_attempts": [
    {
      "number": -9007199254740991,
      "at": "string",
      "reason": "string",
      "outcome": "string"
    }
  ],
  "external_ref": "string",
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "test": {
    "scenario": "string",
    "source": "header",
    "then": "string"
  },
  "created_at": "string",
  "updated_at": "string",
  "accepted_at": "string",
  "void_deadline": "string",
  "voided_at": "string",
  "externally_reversed": {
    "at": "string",
    "third_party_text": {
      "source": "caller",
      "message": "string"
    }
  },
  "fiscal_observations": [
    "string"
  ],
  "delivery": {
    "final": true,
    "files": {
      "complete": true,
      "xml": "pending",
      "cdr": "pending",
      "pdf": "pending",
      "url": "string",
      "downloads": {
        "xml": {
          "url": "string",
          "expires_at": "string"
        },
        "cdr": {
          "url": "string",
          "expires_at": "string"
        },
        "pdf": {
          "url": "string",
          "expires_at": "string"
        }
      }
    },
    "email": {
      "status": "queued",
      "reason": "string",
      "url": "string"
    },
    "delivered_at": "string",
    "what_next": "string"
  },
  "void": {
    "id": "string",
    "object": "invoice_void",
    "invoice_id": "string",
    "invoice_full_number": "string",
    "invoice_status": "voided",
    "kind": "RA",
    "status": "processing",
    "settled": true,
    "next_step": {
      "action": "send_to_provider",
      "attempt": -9007199254740991,
      "scheduled_at": "string",
      "can_advance": true
    },
    "status_reason": "string",
    "held": {
      "since": "string",
      "reason_code": "provider_response_unrecognized",
      "what_next": "string"
    },
    "what_next": "string",
    "reason": "string",
    "summary": {
      "code": "string",
      "day": "string",
      "number": -9007199254740991
    },
    "void_deadline": "string",
    "sunat": {
      "status": "accepted",
      "code": "string",
      "third_party_text": {
        "source": "sunat",
        "message": "string"
      }
    },
    "test": {
      "scenario": "string",
      "source": "header",
      "polls": -9007199254740991,
      "then": "string"
    },
    "requested_by": "string",
    "created_at": "string",
    "updated_at": "string",
    "sent_at": "string",
    "settled_at": "string"
  }
}
```

- `id` (`get-invoices-by-id.response.200.id`; string, required)
- `object` (`get-invoices-by-id.response.200.object`; string, required)
- `environment` (`get-invoices-by-id.response.200.environment`; string, required)
  - one of `"live"`, `"test"`
- `type` (`get-invoices-by-id.response.200.type`; string, required)
  - one of `"factura"`, `"boleta"`
- `series` (`get-invoices-by-id.response.200.series`; string, required)
- `number` (`get-invoices-by-id.response.200.number`; integer, required)
  - min -9007199254740991; max 9007199254740991
- `full_number` (`get-invoices-by-id.response.200.full_number`; string, required)
- `status` (`get-invoices-by-id.response.200.status`; string, required)
  - one of `"processing"`, `"accepted"`, `"rejected"`, `"failed"`, `"voided"`
- `settled` (`get-invoices-by-id.response.200.settled`; boolean, required) — True when nothing more will happen to this invoice by itself.
- `next_step` (`get-invoices-by-id.response.200.next_step`; any of, required) — While it is in process: what happens next and when. `null` once settled.
  - any of:
    - `object`
      - `action` (`get-invoices-by-id.response.200.next_step.1.action`; string, required) — `send_to_provider`: not sent yet · `ask_provider_status`: sent, waiting for SUNAT · `await_manual_resolution`: a test one that waits for a person · `held_for_review`: the provider gave an answer the service cannot interpret; nothing is resent, the staff was told (II-D150). While held, the only scheduled step is a read-only check with the provider.
        - one of `"send_to_provider"`, `"ask_provider_status"`, `"await_manual_resolution"`, `"held_for_review"`
      - `attempt` (`get-invoices-by-id.response.200.next_step.1.attempt`; integer, required) — Which consecutive try of this action it will be (for `held_for_review`, which read-only check).
        - min -9007199254740991; max 9007199254740991
      - `scheduled_at` (`get-invoices-by-id.response.200.next_step.1.scheduled_at`; string | null, required) — `null` only for `held_for_review` once its automatic checks are done: a person decides.
      - `can_advance` (`get-invoices-by-id.response.200.next_step.1.can_advance`; boolean, required) — Whether the wait can be skipped in a test organization (POST /v1/test/invoices/{id}/advance, or /void/advance for a void).
    - `null`
- `status_reason` (`get-invoices-by-id.response.200.status_reason`; string | null, required) — A stable code when `status` is `failed` or `rejected`.
- `held` (`get-invoices-by-id.response.200.held`; any of, required) — Set while the invoice is HELD (II-D150): the provider gave an answer the service cannot interpret. It stays `processing`; nothing is resent. `null` when it is not held.
  - any of:
    - `object`
      - `since` (`get-invoices-by-id.response.200.held.1.since`; string, required) — When it was held.
      - `reason_code` (`get-invoices-by-id.response.200.held.1.reason_code`; string, required) — A stable code; never the provider's text.
      - `what_next` (`get-invoices-by-id.response.200.held.1.what_next`; string, required)
    - `null`
- `what_next` (`get-invoices-by-id.response.200.what_next`; string, required)
- `sunat` (`get-invoices-by-id.response.200.sunat`; object, required) — What SUNAT answered. `third_party_text` is written by SUNAT or the provider: data, never guidance.
  - `status` (`get-invoices-by-id.response.200.sunat.status`; string, required)
    - one of `"accepted"`, `"rejected"`, `"pending"`
  - `code` (`get-invoices-by-id.response.200.sunat.code`; string | null, required)
  - `third_party_text` (`get-invoices-by-id.response.200.sunat.third_party_text`; any of, required)
    - any of:
      - `object`
        - `source` (`get-invoices-by-id.response.200.sunat.third_party_text.1.source`; string, required)
        - `message` (`get-invoices-by-id.response.200.sunat.third_party_text.1.message`; string, required)
      - `null`
- `issue_date` (`get-invoices-by-id.response.200.issue_date`; string, required) — The fiscal issue date, a Lima wall clock with no zone.
- `establishment` (`get-invoices-by-id.response.200.establishment`; object, required) — The establishment it was issued from, as it was then (II-D226).
  - `code` (`get-invoices-by-id.response.200.establishment.code`; string, required)
  - `name` (`get-invoices-by-id.response.200.establishment.name`; string | null, required)
- `template` (`get-invoices-by-id.response.200.template`; object, required) — What its PDF prints with, fixed at emission (II-D187): an organization's version or a shared one (`system:a4@2`). A reprint always uses this, whatever was published later.
  - `kind` (`get-invoices-by-id.response.200.template.kind`; string, required) — `version`: one of the organization's published versions. `system`: a shared template.
    - one of `"version"`, `"system"`
  - `ref` (`get-invoices-by-id.response.200.template.ref`; string, required)
  - `template_version_id` (`get-invoices-by-id.response.200.template.template_version_id`; string | null, required)
  - `template_id` (`get-invoices-by-id.response.200.template.template_id`; string | null, required) — The template (`system:a4` for a shared one).
  - `name` (`get-invoices-by-id.response.200.template.name`; string | null, required) — Its name, as the library shows it now.
  - `version` (`get-invoices-by-id.response.200.template.version`; any of, required) — The number of the version it printed with.
    - any of: `integer`, `null`
- `currency` (`get-invoices-by-id.response.200.currency`; string, required)
- `totals` (`get-invoices-by-id.response.200.totals`; object, required)
  - `taxable` (`get-invoices-by-id.response.200.totals.taxable`; string, required)
  - `exempt` (`get-invoices-by-id.response.200.totals.exempt`; string, required)
  - `unaffected` (`get-invoices-by-id.response.200.totals.unaffected`; string, required)
  - `tax` (`get-invoices-by-id.response.200.totals.tax`; string, required)
  - `total` (`get-invoices-by-id.response.200.totals.total`; string, required)
- `customer` (`get-invoices-by-id.response.200.customer`; object, required) — The customer plus how to reach them, as the invoice FROZE them when it was issued (not the customer as it is now): `email`, where it is sent, and `address`, what it prints; each `null` when it was issued without it. Only here: the light row of the listing, the events and the webhooks carry no address of the customer.
  - `id` (`get-invoices-by-id.response.200.customer.id`; string | null, required)
  - `id_type` (`get-invoices-by-id.response.200.customer.id_type`; string, required)
  - `id_number` (`get-invoices-by-id.response.200.customer.id_number`; string, required)
  - `name` (`get-invoices-by-id.response.200.customer.name`; string, required)
  - `email` (`get-invoices-by-id.response.200.customer.email`; string | null, required)
  - `address` (`get-invoices-by-id.response.200.customer.address`; string | null, required)
- `items` (`get-invoices-by-id.response.200.items`; array<object>, required)
  - `description` (`get-invoices-by-id.response.200.items.description`; string, required)
  - `code` (`get-invoices-by-id.response.200.items.code`; string | null, required)
  - `quantity` (`get-invoices-by-id.response.200.items.quantity`; string, required)
  - `unit` (`get-invoices-by-id.response.200.items.unit`; string, required)
  - `unit_value` (`get-invoices-by-id.response.200.items.unit_value`; string, required)
  - `unit_price` (`get-invoices-by-id.response.200.items.unit_price`; string, required)
  - `tax_code` (`get-invoices-by-id.response.200.items.tax_code`; string, required)
  - `subtotal` (`get-invoices-by-id.response.200.items.subtotal`; string, required)
  - `tax` (`get-invoices-by-id.response.200.items.tax`; string, required)
  - `total` (`get-invoices-by-id.response.200.items.total`; string, required)
- `notes` (`get-invoices-by-id.response.200.notes`; string | null, required)
- `hash` (`get-invoices-by-id.response.200.hash`; string | null, required)
- `provider` (`get-invoices-by-id.response.200.provider`; string, required)
  - one of `"simulator"`, `"bizlinks"`
- `attempt` (`get-invoices-by-id.response.200.attempt`; integer, required)
  - min -9007199254740991; max 9007199254740991
- `previous_attempts` (`get-invoices-by-id.response.200.previous_attempts`; array<object>, required)
  - `number` (`get-invoices-by-id.response.200.previous_attempts.number`; integer, required)
    - min -9007199254740991; max 9007199254740991
  - `at` (`get-invoices-by-id.response.200.previous_attempts.at`; string, required)
  - `reason` (`get-invoices-by-id.response.200.previous_attempts.reason`; string, required)
  - `outcome` (`get-invoices-by-id.response.200.previous_attempts.outcome`; string, required)
- `external_ref` (`get-invoices-by-id.response.200.external_ref`; string | null, required)
- `metadata` (`get-invoices-by-id.response.200.metadata`; any of, required)
  - any of: `map<string>`, `null`
- `test` (`get-invoices-by-id.response.200.test`; any of, required)
  - any of:
    - `object`
      - `scenario` (`get-invoices-by-id.response.200.test.1.scenario`; string, required)
      - `source` (`get-invoices-by-id.response.200.test.1.source`; string, required)
        - one of `"header"`, `"default"`
      - `then` (`get-invoices-by-id.response.200.test.1.then`; string, optional)
    - `null`
- `created_at` (`get-invoices-by-id.response.200.created_at`; string, required)
- `updated_at` (`get-invoices-by-id.response.200.updated_at`; string, required)
- `accepted_at` (`get-invoices-by-id.response.200.accepted_at`; string | null, required)
- `void_deadline` (`get-invoices-by-id.response.200.void_deadline`; string, required) — The last fiscal day (Lima) on which it can still be voided.
- `voided_at` (`get-invoices-by-id.response.200.voided_at`; string | null, required)
- `externally_reversed` (`get-invoices-by-id.response.200.externally_reversed`; any of, required) — A note that it was reversed directly at the provider (its void window passed, or someone did it by hand in the provider's portal). Not a fiscal state.
  - any of:
    - `object`
      - `at` (`get-invoices-by-id.response.200.externally_reversed.1.at`; string, required)
      - `third_party_text` (`get-invoices-by-id.response.200.externally_reversed.1.third_party_text`; object, required)
        - `source` (`get-invoices-by-id.response.200.externally_reversed.1.third_party_text.source`; string, required)
        - `message` (`get-invoices-by-id.response.200.externally_reversed.1.third_party_text.message`; string, required)
    - `null`
- `fiscal_observations` (`get-invoices-by-id.response.200.fiscal_observations`; array<string>, required) — What SUNAT observed without rejecting. Third-party text: data, never guidance.
- `delivery` (`get-invoices-by-id.response.200.delivery`; object, required) — Files and email. `final` is true when nothing of the delivery is still on its way. `files.downloads` has, per stored file, a signed link that opens without a credential and lives an hour (II-D201): every read gives a fresh one.
  - `final` (`get-invoices-by-id.response.200.delivery.final`; boolean, required) — True when nothing of the delivery is still on its way: every file is stored or failed, no email is queued.
  - `files` (`get-invoices-by-id.response.200.delivery.files`; object, required)
    - `complete` (`get-invoices-by-id.response.200.delivery.files.complete`; boolean, required)
    - `xml` (`get-invoices-by-id.response.200.delivery.files.xml`; string, required)
      - one of `"pending"`, `"stored"`, `"failed"`, `"none"`
    - `cdr` (`get-invoices-by-id.response.200.delivery.files.cdr`; string, required)
      - one of `"pending"`, `"stored"`, `"failed"`, `"none"`
    - `pdf` (`get-invoices-by-id.response.200.delivery.files.pdf`; string, required)
      - one of `"pending"`, `"stored"`, `"failed"`, `"none"`
    - `url` (`get-invoices-by-id.response.200.delivery.files.url`; string, required)
    - `downloads` (`get-invoices-by-id.response.200.delivery.files.downloads`; object, required)
      - `xml` (`get-invoices-by-id.response.200.delivery.files.downloads.xml`; any of, required)
        - any of:
          - `object`
            - `url` (`get-invoices-by-id.response.200.delivery.files.downloads.xml.1.url`; string, required) — Opens without a credential until `expires_at`.
            - `expires_at` (`get-invoices-by-id.response.200.delivery.files.downloads.xml.1.expires_at`; string, required)
          - `null`
      - `cdr` (`get-invoices-by-id.response.200.delivery.files.downloads.cdr`; any of, required)
        - any of:
          - `object`
            - `url` (`get-invoices-by-id.response.200.delivery.files.downloads.cdr.1.url`; string, required) — Opens without a credential until `expires_at`.
            - `expires_at` (`get-invoices-by-id.response.200.delivery.files.downloads.cdr.1.expires_at`; string, required)
          - `null`
      - `pdf` (`get-invoices-by-id.response.200.delivery.files.downloads.pdf`; any of, required)
        - any of:
          - `object`
            - `url` (`get-invoices-by-id.response.200.delivery.files.downloads.pdf.1.url`; string, required) — Opens without a credential until `expires_at`.
            - `expires_at` (`get-invoices-by-id.response.200.delivery.files.downloads.pdf.1.expires_at`; string, required)
          - `null`
  - `email` (`get-invoices-by-id.response.200.delivery.email`; object, required) — The email of emission (the automatic one), or the first one asked for. `none`: there is none.
    - `status` (`get-invoices-by-id.response.200.delivery.email.status`; string, required)
      - one of `"queued"`, `"sent"`, `"not_sent"`, `"failed"`, `"none"`
    - `reason` (`get-invoices-by-id.response.200.delivery.email.reason`; string | null, required)
    - `url` (`get-invoices-by-id.response.200.delivery.email.url`; string, required)
  - `delivered_at` (`get-invoices-by-id.response.200.delivery.delivered_at`; string | null, required) — When the first email to the customer really went out.
  - `what_next` (`get-invoices-by-id.response.200.delivery.what_next`; string | null, required) — What only you can do now, in words; `null` when nothing is needed from you: the rest happens by itself.
- `void` (`get-invoices-by-id.response.200.void`; any of, required) — The latest void asked for this invoice, or `null` when none ever was.
  - any of:
    - `object`
      - `id` (`get-invoices-by-id.response.200.void.1.id`; string, required)
      - `object` (`get-invoices-by-id.response.200.void.1.object`; string, required)
      - `invoice_id` (`get-invoices-by-id.response.200.void.1.invoice_id`; string, required)
      - `invoice_full_number` (`get-invoices-by-id.response.200.void.1.invoice_full_number`; string, required)
      - `invoice_status` (`get-invoices-by-id.response.200.void.1.invoice_status`; string, required) — The invoice is `accepted` while its void is in process, rejected or failed; `voided` only when the void is accepted.
        - one of `"voided"`, `"accepted"`
      - `kind` (`get-invoices-by-id.response.200.void.1.kind`; string, required) — `RA`: summary of voided invoices (a factura). `RC`: daily summary (a boleta).
        - one of `"RA"`, `"RC"`
      - `status` (`get-invoices-by-id.response.200.void.1.status`; string, required)
        - one of `"processing"`, `"accepted"`, `"rejected"`, `"failed"`
      - `settled` (`get-invoices-by-id.response.200.void.1.settled`; boolean, required) — True when nothing more will happen to this void by itself.
      - `next_step` (`get-invoices-by-id.response.200.void.1.next_step`; any of, required) — While it is in process: what happens next and when. `null` once settled.
        - any of:
          - `object`
            - `action` (`get-invoices-by-id.response.200.void.1.next_step.1.action`; string, required) — `send_to_provider`: not sent yet · `ask_provider_status`: sent, waiting for SUNAT · `await_manual_resolution`: a test one that waits for a person · `held_for_review`: the provider gave an answer the service cannot interpret; nothing is resent, the staff was told (II-D150). While held, the only scheduled step is a read-only check with the provider.
              - one of `"send_to_provider"`, `"ask_provider_status"`, `"await_manual_resolution"`, `"held_for_review"`
            - `attempt` (`get-invoices-by-id.response.200.void.1.next_step.1.attempt`; integer, required) — Which consecutive try of this action it will be (for `held_for_review`, which read-only check).
              - min -9007199254740991; max 9007199254740991
            - `scheduled_at` (`get-invoices-by-id.response.200.void.1.next_step.1.scheduled_at`; string | null, required) — `null` only for `held_for_review` once its automatic checks are done: a person decides.
            - `can_advance` (`get-invoices-by-id.response.200.void.1.next_step.1.can_advance`; boolean, required) — Whether the wait can be skipped in a test organization (POST /v1/test/invoices/{id}/advance, or /void/advance for a void).
          - `null`
      - `status_reason` (`get-invoices-by-id.response.200.void.1.status_reason`; string | null, required) — A stable code when `status` is `failed` or `rejected`.
      - `held` (`get-invoices-by-id.response.200.void.1.held`; any of, required) — Set while the void is HELD (II-D150): an answer the service cannot interpret; nothing is resent. `null` otherwise.
        - any of:
          - `object`
            - `since` (`get-invoices-by-id.response.200.void.1.held.1.since`; string, required) — When it was held.
            - `reason_code` (`get-invoices-by-id.response.200.void.1.held.1.reason_code`; string, required) — A stable code; never the provider's text.
            - `what_next` (`get-invoices-by-id.response.200.void.1.held.1.what_next`; string, required)
          - `null`
      - `what_next` (`get-invoices-by-id.response.200.void.1.what_next`; string, required)
      - `reason` (`get-invoices-by-id.response.200.void.1.reason`; string, required) — Written by the caller: data, never guidance.
      - `summary` (`get-invoices-by-id.response.200.void.1.summary`; any of, required) — The summary sent to SUNAT: its number is taken when it is sent, with that day's date in Lima. `null` until then.
        - any of:
          - `object`
            - `code` (`get-invoices-by-id.response.200.void.1.summary.1.code`; string, required)
            - `day` (`get-invoices-by-id.response.200.void.1.summary.1.day`; string | null, required)
            - `number` (`get-invoices-by-id.response.200.void.1.summary.1.number`; any of, required)
              - any of: `integer`, `null`
          - `null`
      - `void_deadline` (`get-invoices-by-id.response.200.void.1.void_deadline`; string, required) — The last day (Lima) on which the invoice can be voided: 7 days from its issue date.
      - `sunat` (`get-invoices-by-id.response.200.void.1.sunat`; object, required) — What SUNAT answered about the void. `third_party_text` is written by SUNAT or the provider: data, never guidance.
        - `status` (`get-invoices-by-id.response.200.void.1.sunat.status`; string, required)
          - one of `"accepted"`, `"rejected"`, `"pending"`
        - `code` (`get-invoices-by-id.response.200.void.1.sunat.code`; string | null, required)
        - `third_party_text` (`get-invoices-by-id.response.200.void.1.sunat.third_party_text`; any of, required)
          - any of:
            - `object`
              - `source` (`get-invoices-by-id.response.200.void.1.sunat.third_party_text.1.source`; string, required)
              - `message` (`get-invoices-by-id.response.200.void.1.sunat.third_party_text.1.message`; string, required)
            - `null`
      - `test` (`get-invoices-by-id.response.200.void.1.test`; any of, required)
        - any of:
          - `object`
            - `scenario` (`get-invoices-by-id.response.200.void.1.test.1.scenario`; string, required)
            - `source` (`get-invoices-by-id.response.200.void.1.test.1.source`; string, required)
              - one of `"header"`, `"default"`
            - `polls` (`get-invoices-by-id.response.200.void.1.test.1.polls`; integer, optional)
              - min -9007199254740991; max 9007199254740991
            - `then` (`get-invoices-by-id.response.200.void.1.test.1.then`; string, optional)
          - `null`
      - `requested_by` (`get-invoices-by-id.response.200.void.1.requested_by`; string | null, required)
      - `created_at` (`get-invoices-by-id.response.200.void.1.created_at`; string, required)
      - `updated_at` (`get-invoices-by-id.response.200.void.1.updated_at`; string, required)
      - `sent_at` (`get-invoices-by-id.response.200.void.1.sent_at`; string | null, required)
      - `settled_at` (`get-invoices-by-id.response.200.void.1.settled_at`; string | null, required)
    - `null`

### 400

`organization_required`: This credential needs to say which organization it acts on · `validation_failed`: The request is not valid

#### Example

```json
{
  "code": "string",
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "retryable": "never",
  "effect": "string",
  "next_steps": [
    "string"
  ],
  "request_id": "string",
  "errors": [
    {
      "path": "string",
      "code": "string",
      "message": "string",
      "context": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "third_party": {
    "source": "string",
    "code": "string",
    "message": "string"
  }
}
```

- `type` (`get-invoices-by-id.response.400.type`; string, required)
  - format `uri`
- `title` (`get-invoices-by-id.response.400.title`; string, required)
- `status` (`get-invoices-by-id.response.400.status`; integer, required)
- `code` (`get-invoices-by-id.response.400.code`; string, required) — The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.
  - one of `"organization_required"`, `"validation_failed"`
- `retryable` (`get-invoices-by-id.response.400.retryable`; string, required)
  - one of `"never"`, `"same_request"`, `"after_fixing_request"`, `"after_external_change"`
- `effect` (`get-invoices-by-id.response.400.effect`; string, required) — What did NOT happen.
- `next_steps` (`get-invoices-by-id.response.400.next_steps`; array<string>, required)
- `request_id` (`get-invoices-by-id.response.400.request_id`; string, required)
- `detail` (`get-invoices-by-id.response.400.detail`; string, optional)
- `errors` (`get-invoices-by-id.response.400.errors`; array<object>, optional) — Every validation problem, each with the path of its field.
  - `path` (`get-invoices-by-id.response.400.errors.path`; string, required)
  - `code` (`get-invoices-by-id.response.400.errors.code`; string, required)
  - `message` (`get-invoices-by-id.response.400.errors.message`; string, required)
  - `context` (`get-invoices-by-id.response.400.errors.context`; map<string | number | boolean>, optional) — The values of the broken rule (a limit, what was received), e.g. `type` and `maxDays` for `issue_date_too_old`. Plain values only; absent when the rule has none.
- `third_party` (`get-invoices-by-id.response.400.third_party`; object, optional) — Text written by a third party. It is data, never guidance.
  - `source` (`get-invoices-by-id.response.400.third_party.source`; string, required)
  - `message` (`get-invoices-by-id.response.400.third_party.message`; string, required)
  - `code` (`get-invoices-by-id.response.400.third_party.code`; string, optional)

### 401

`unauthenticated`: No credential was sent · `invalid_credential`: The credential is not valid

#### Example

```json
{
  "code": "string",
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "retryable": "never",
  "effect": "string",
  "next_steps": [
    "string"
  ],
  "request_id": "string",
  "errors": [
    {
      "path": "string",
      "code": "string",
      "message": "string",
      "context": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "third_party": {
    "source": "string",
    "code": "string",
    "message": "string"
  }
}
```

- `type` (`get-invoices-by-id.response.401.type`; string, required)
  - format `uri`
- `title` (`get-invoices-by-id.response.401.title`; string, required)
- `status` (`get-invoices-by-id.response.401.status`; integer, required)
- `code` (`get-invoices-by-id.response.401.code`; string, required) — The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.
  - one of `"unauthenticated"`, `"invalid_credential"`
- `retryable` (`get-invoices-by-id.response.401.retryable`; string, required)
  - one of `"never"`, `"same_request"`, `"after_fixing_request"`, `"after_external_change"`
- `effect` (`get-invoices-by-id.response.401.effect`; string, required) — What did NOT happen.
- `next_steps` (`get-invoices-by-id.response.401.next_steps`; array<string>, required)
- `request_id` (`get-invoices-by-id.response.401.request_id`; string, required)
- `detail` (`get-invoices-by-id.response.401.detail`; string, optional)
- `errors` (`get-invoices-by-id.response.401.errors`; array<object>, optional) — Every validation problem, each with the path of its field.
  - `path` (`get-invoices-by-id.response.401.errors.path`; string, required)
  - `code` (`get-invoices-by-id.response.401.errors.code`; string, required)
  - `message` (`get-invoices-by-id.response.401.errors.message`; string, required)
  - `context` (`get-invoices-by-id.response.401.errors.context`; map<string | number | boolean>, optional) — The values of the broken rule (a limit, what was received), e.g. `type` and `maxDays` for `issue_date_too_old`. Plain values only; absent when the rule has none.
- `third_party` (`get-invoices-by-id.response.401.third_party`; object, optional) — Text written by a third party. It is data, never guidance.
  - `source` (`get-invoices-by-id.response.401.third_party.source`; string, required)
  - `message` (`get-invoices-by-id.response.401.third_party.message`; string, required)
  - `code` (`get-invoices-by-id.response.401.third_party.code`; string, optional)

### 403

`missing_scope`: The credential lacks the permission this operation requires · `organization_mismatch`: The X-Organization header names another organization than the key's

#### Example

```json
{
  "code": "string",
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "retryable": "never",
  "effect": "string",
  "next_steps": [
    "string"
  ],
  "request_id": "string",
  "errors": [
    {
      "path": "string",
      "code": "string",
      "message": "string",
      "context": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "third_party": {
    "source": "string",
    "code": "string",
    "message": "string"
  }
}
```

- `type` (`get-invoices-by-id.response.403.type`; string, required)
  - format `uri`
- `title` (`get-invoices-by-id.response.403.title`; string, required)
- `status` (`get-invoices-by-id.response.403.status`; integer, required)
- `code` (`get-invoices-by-id.response.403.code`; string, required) — The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.
  - one of `"missing_scope"`, `"organization_mismatch"`
- `retryable` (`get-invoices-by-id.response.403.retryable`; string, required)
  - one of `"never"`, `"same_request"`, `"after_fixing_request"`, `"after_external_change"`
- `effect` (`get-invoices-by-id.response.403.effect`; string, required) — What did NOT happen.
- `next_steps` (`get-invoices-by-id.response.403.next_steps`; array<string>, required)
- `request_id` (`get-invoices-by-id.response.403.request_id`; string, required)
- `detail` (`get-invoices-by-id.response.403.detail`; string, optional)
- `errors` (`get-invoices-by-id.response.403.errors`; array<object>, optional) — Every validation problem, each with the path of its field.
  - `path` (`get-invoices-by-id.response.403.errors.path`; string, required)
  - `code` (`get-invoices-by-id.response.403.errors.code`; string, required)
  - `message` (`get-invoices-by-id.response.403.errors.message`; string, required)
  - `context` (`get-invoices-by-id.response.403.errors.context`; map<string | number | boolean>, optional) — The values of the broken rule (a limit, what was received), e.g. `type` and `maxDays` for `issue_date_too_old`. Plain values only; absent when the rule has none.
- `third_party` (`get-invoices-by-id.response.403.third_party`; object, optional) — Text written by a third party. It is data, never guidance.
  - `source` (`get-invoices-by-id.response.403.third_party.source`; string, required)
  - `message` (`get-invoices-by-id.response.403.third_party.message`; string, required)
  - `code` (`get-invoices-by-id.response.403.third_party.code`; string, optional)

### 404

`not_found`: The resource does not exist in this organization

#### Example

```json
{
  "code": "string",
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "retryable": "never",
  "effect": "string",
  "next_steps": [
    "string"
  ],
  "request_id": "string",
  "errors": [
    {
      "path": "string",
      "code": "string",
      "message": "string",
      "context": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "third_party": {
    "source": "string",
    "code": "string",
    "message": "string"
  }
}
```

- `type` (`get-invoices-by-id.response.404.type`; string, required)
  - format `uri`
- `title` (`get-invoices-by-id.response.404.title`; string, required)
- `status` (`get-invoices-by-id.response.404.status`; integer, required)
- `code` (`get-invoices-by-id.response.404.code`; string, required) — The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.
  - one of `"not_found"`
- `retryable` (`get-invoices-by-id.response.404.retryable`; string, required)
  - one of `"never"`, `"same_request"`, `"after_fixing_request"`, `"after_external_change"`
- `effect` (`get-invoices-by-id.response.404.effect`; string, required) — What did NOT happen.
- `next_steps` (`get-invoices-by-id.response.404.next_steps`; array<string>, required)
- `request_id` (`get-invoices-by-id.response.404.request_id`; string, required)
- `detail` (`get-invoices-by-id.response.404.detail`; string, optional)
- `errors` (`get-invoices-by-id.response.404.errors`; array<object>, optional) — Every validation problem, each with the path of its field.
  - `path` (`get-invoices-by-id.response.404.errors.path`; string, required)
  - `code` (`get-invoices-by-id.response.404.errors.code`; string, required)
  - `message` (`get-invoices-by-id.response.404.errors.message`; string, required)
  - `context` (`get-invoices-by-id.response.404.errors.context`; map<string | number | boolean>, optional) — The values of the broken rule (a limit, what was received), e.g. `type` and `maxDays` for `issue_date_too_old`. Plain values only; absent when the rule has none.
- `third_party` (`get-invoices-by-id.response.404.third_party`; object, optional) — Text written by a third party. It is data, never guidance.
  - `source` (`get-invoices-by-id.response.404.third_party.source`; string, required)
  - `message` (`get-invoices-by-id.response.404.third_party.message`; string, required)
  - `code` (`get-invoices-by-id.response.404.third_party.code`; string, optional)

### 429

`rate_limited`: Too many requests

#### Example

```json
{
  "code": "string",
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "retryable": "never",
  "effect": "string",
  "next_steps": [
    "string"
  ],
  "request_id": "string",
  "errors": [
    {
      "path": "string",
      "code": "string",
      "message": "string",
      "context": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "third_party": {
    "source": "string",
    "code": "string",
    "message": "string"
  }
}
```

- `type` (`get-invoices-by-id.response.429.type`; string, required)
  - format `uri`
- `title` (`get-invoices-by-id.response.429.title`; string, required)
- `status` (`get-invoices-by-id.response.429.status`; integer, required)
- `code` (`get-invoices-by-id.response.429.code`; string, required) — The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.
  - one of `"rate_limited"`
- `retryable` (`get-invoices-by-id.response.429.retryable`; string, required)
  - one of `"never"`, `"same_request"`, `"after_fixing_request"`, `"after_external_change"`
- `effect` (`get-invoices-by-id.response.429.effect`; string, required) — What did NOT happen.
- `next_steps` (`get-invoices-by-id.response.429.next_steps`; array<string>, required)
- `request_id` (`get-invoices-by-id.response.429.request_id`; string, required)
- `detail` (`get-invoices-by-id.response.429.detail`; string, optional)
- `errors` (`get-invoices-by-id.response.429.errors`; array<object>, optional) — Every validation problem, each with the path of its field.
  - `path` (`get-invoices-by-id.response.429.errors.path`; string, required)
  - `code` (`get-invoices-by-id.response.429.errors.code`; string, required)
  - `message` (`get-invoices-by-id.response.429.errors.message`; string, required)
  - `context` (`get-invoices-by-id.response.429.errors.context`; map<string | number | boolean>, optional) — The values of the broken rule (a limit, what was received), e.g. `type` and `maxDays` for `issue_date_too_old`. Plain values only; absent when the rule has none.
- `third_party` (`get-invoices-by-id.response.429.third_party`; object, optional) — Text written by a third party. It is data, never guidance.
  - `source` (`get-invoices-by-id.response.429.third_party.source`; string, required)
  - `message` (`get-invoices-by-id.response.429.third_party.message`; string, required)
  - `code` (`get-invoices-by-id.response.429.third_party.code`; string, optional)

### 500

`internal_error`: The service failed

#### Example

```json
{
  "code": "string",
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "retryable": "never",
  "effect": "string",
  "next_steps": [
    "string"
  ],
  "request_id": "string",
  "errors": [
    {
      "path": "string",
      "code": "string",
      "message": "string",
      "context": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "third_party": {
    "source": "string",
    "code": "string",
    "message": "string"
  }
}
```

- `type` (`get-invoices-by-id.response.500.type`; string, required)
  - format `uri`
- `title` (`get-invoices-by-id.response.500.title`; string, required)
- `status` (`get-invoices-by-id.response.500.status`; integer, required)
- `code` (`get-invoices-by-id.response.500.code`; string, required) — The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.
  - one of `"internal_error"`
- `retryable` (`get-invoices-by-id.response.500.retryable`; string, required)
  - one of `"never"`, `"same_request"`, `"after_fixing_request"`, `"after_external_change"`
- `effect` (`get-invoices-by-id.response.500.effect`; string, required) — What did NOT happen.
- `next_steps` (`get-invoices-by-id.response.500.next_steps`; array<string>, required)
- `request_id` (`get-invoices-by-id.response.500.request_id`; string, required)
- `detail` (`get-invoices-by-id.response.500.detail`; string, optional)
- `errors` (`get-invoices-by-id.response.500.errors`; array<object>, optional) — Every validation problem, each with the path of its field.
  - `path` (`get-invoices-by-id.response.500.errors.path`; string, required)
  - `code` (`get-invoices-by-id.response.500.errors.code`; string, required)
  - `message` (`get-invoices-by-id.response.500.errors.message`; string, required)
  - `context` (`get-invoices-by-id.response.500.errors.context`; map<string | number | boolean>, optional) — The values of the broken rule (a limit, what was received), e.g. `type` and `maxDays` for `issue_date_too_old`. Plain values only; absent when the rule has none.
- `third_party` (`get-invoices-by-id.response.500.third_party`; object, optional) — Text written by a third party. It is data, never guidance.
  - `source` (`get-invoices-by-id.response.500.third_party.source`; string, required)
  - `message` (`get-invoices-by-id.response.500.third_party.message`; string, required)
  - `code` (`get-invoices-by-id.response.500.third_party.code`; string, optional)

### 503

`service_unavailable`: The service cannot answer right now

#### Example

```json
{
  "code": "string",
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "retryable": "never",
  "effect": "string",
  "next_steps": [
    "string"
  ],
  "request_id": "string",
  "errors": [
    {
      "path": "string",
      "code": "string",
      "message": "string",
      "context": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "third_party": {
    "source": "string",
    "code": "string",
    "message": "string"
  }
}
```

- `type` (`get-invoices-by-id.response.503.type`; string, required)
  - format `uri`
- `title` (`get-invoices-by-id.response.503.title`; string, required)
- `status` (`get-invoices-by-id.response.503.status`; integer, required)
- `code` (`get-invoices-by-id.response.503.code`; string, required) — The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.
  - one of `"service_unavailable"`
- `retryable` (`get-invoices-by-id.response.503.retryable`; string, required)
  - one of `"never"`, `"same_request"`, `"after_fixing_request"`, `"after_external_change"`
- `effect` (`get-invoices-by-id.response.503.effect`; string, required) — What did NOT happen.
- `next_steps` (`get-invoices-by-id.response.503.next_steps`; array<string>, required)
- `request_id` (`get-invoices-by-id.response.503.request_id`; string, required)
- `detail` (`get-invoices-by-id.response.503.detail`; string, optional)
- `errors` (`get-invoices-by-id.response.503.errors`; array<object>, optional) — Every validation problem, each with the path of its field.
  - `path` (`get-invoices-by-id.response.503.errors.path`; string, required)
  - `code` (`get-invoices-by-id.response.503.errors.code`; string, required)
  - `message` (`get-invoices-by-id.response.503.errors.message`; string, required)
  - `context` (`get-invoices-by-id.response.503.errors.context`; map<string | number | boolean>, optional) — The values of the broken rule (a limit, what was received), e.g. `type` and `maxDays` for `issue_date_too_old`. Plain values only; absent when the rule has none.
- `third_party` (`get-invoices-by-id.response.503.third_party`; object, optional) — Text written by a third party. It is data, never guidance.
  - `source` (`get-invoices-by-id.response.503.third_party.source`; string, required)
  - `message` (`get-invoices-by-id.response.503.third_party.message`; string, required)
  - `code` (`get-invoices-by-id.response.503.third_party.code`; string, optional)


Source: https://docs.invox.page/api/get-invoices-by-id/index.md
