Skip to content
Navigation

Set the fiscal data of the issuer

Creates the issuer the first time and replaces its fiscal data afterwards: a field that is omitted is cleared, except tax_regime, which stays as it is unless sent. To change some fields without overwriting what someone else saved, use PATCH /v1/issuer with the revision. On the live organization the RUC is the one it was created with and cannot change (tax_id_immutable); an older live organization without an issuer creates it here once. A test organization already has a test issuer with the same RUC; there everything can change. email is where customers reply: every email to a customer carries it as reply-to.

PUT
https://api.invox.page/v1/issuer

Authorization

  • bearer
    HTTP
    required

Header parameters

  • X-Organization
    optional
    string

    Required with a person's access token: the organization to act on. Omit it with a service-account key.

    format: uuid

Request body JSON required

  • tax_id
    string
    required
    pattern: ^(10|15|16|17|20)\d{9}$
  • legal_name
    string
    required

    Razón social, exactly as registered with SUNAT.

    maxLength: 255 · minLength: 1
  • trade_name
    optional

    Any of the following:

    • string
    • null
  • address
    optional

    Domicilio fiscal.

    Any of the following:

    • string
    • null
  • ubigeo
    optional

    Any of the following:

    • string
    • null
  • department
    optional

    Any of the following:

    • string
    • null
  • province
    optional

    Any of the following:

    • string
    • null
  • district
    optional

    Any of the following:

    • string
    • null
  • email
    optional

    Where customers reply: every email this service sends to a customer of this issuer carries it as reply-to. Omitted or null: no reply-to.

    Any of the following:

    • string
    • null
  • tax_regime
    optional

    The tax regime: general, mype (Régimen MYPE Tributario), especial (Régimen Especial) or nrus (Nuevo RUS). Required before asking for production. Under nrus the issuer issues boletas and their notes, never facturas. Omitted: it stays as it is; null clears it. It cannot change while an activation request is open.

    Any of the following:

    • string
    • null
  • default_template
    optional

    The template this face prints with when an invoice names none (II-D191): the id of one of your templates or a shared one (system:thermal-80). It must be printable on this face: on the live face, a template with a promoted version (template_version_not_promoted); on the test face, a published one. Omitted: it stays as it is; null goes back to system:a4.

    Any of the following:

    • any of

      Any of the following:

      • string
      • string
    • null

Returns

200

The issuer, updated.

JSON
  • id
    string
    required
  • tax_id
    string
    required
  • legal_name
    string
    required
  • trade_name
    string | null
    required
  • address
    string | null
    required
  • ubigeo
    string | null
    required
  • department
    string | null
    required
  • province
    string | null
    required
  • district
    string | null
    required
  • email
    string | null
    required

    Where customers' replies go: the reply-to of every email this service sends to a customer of this issuer.

  • tax_regime
    required

    general, mype, especial or nrus; null until declared. Under nrus no facturas are issued.

    Any of the following:

    • string
    • null
  • ruc
    object
    required

    The RUC as SUNAT data last showed it (live organizations). unverified: not answered yet, the service retries by itself. not_found: SUNAT does not know it. On a test organization it stays unverified: its RUC is editable and never looked up.

    • verification
      unverified
      or
      verified
      or
      not_found
      required
    • status
      string | null
      required
    • condition
      string | null
      required
    • checked_at
      string | null
      required
  • default_template
    string | null
    required

    The template this face prints with when an invoice names none (II-D191): the id of one of the organization's templates, or a shared one (system:a4). null: the shared system:a4.

  • status
    string
    required
  • revision
    integer
    required

    Goes up with every write that changes a field a person edits, the RUC sweep's fill included (IW-D9, IW-D29). Send it back with a PATCH: only a field somebody else changed meanwhile conflicts.

    maximum: 9007199254740991 · minimum: -9007199254740991
  • created_at
    string
    required
  • updated_at
    string
    required

201

The issuer, created.

JSON
  • id
    string
    required
  • tax_id
    string
    required
  • legal_name
    string
    required
  • trade_name
    string | null
    required
  • address
    string | null
    required
  • ubigeo
    string | null
    required
  • department
    string | null
    required
  • province
    string | null
    required
  • district
    string | null
    required
  • email
    string | null
    required

    Where customers' replies go: the reply-to of every email this service sends to a customer of this issuer.

  • tax_regime
    required

    general, mype, especial or nrus; null until declared. Under nrus no facturas are issued.

    Any of the following:

    • string
    • null
  • ruc
    object
    required

    The RUC as SUNAT data last showed it (live organizations). unverified: not answered yet, the service retries by itself. not_found: SUNAT does not know it. On a test organization it stays unverified: its RUC is editable and never looked up.

    • verification
      unverified
      or
      verified
      or
      not_found
      required
    • status
      string | null
      required
    • condition
      string | null
      required
    • checked_at
      string | null
      required
  • default_template
    string | null
    required

    The template this face prints with when an invoice names none (II-D191): the id of one of the organization's templates, or a shared one (system:a4). null: the shared system:a4.

  • status
    string
    required
  • revision
    integer
    required

    Goes up with every write that changes a field a person edits, the RUC sweep's fill included (IW-D9, IW-D29). Send it back with a PATCH: only a field somebody else changed meanwhile conflicts.

    maximum: 9007199254740991 · minimum: -9007199254740991
  • created_at
    string
    required
  • updated_at
    string
    required

400

organization_required: This credential needs to say which organization it acts on · validation_failed: The request is not valid · malformed_request: The request body is not valid JSON
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    organization_required
    or
    validation_failed
    or
    malformed_request
    required

    The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.

  • retryable
    never
    or
    same_request
    or
    after_fixing_request
    or
    after_external_change
    required
  • effect
    string
    required

    What did NOT happen.

  • next_steps
    array of
    string
    required
  • request_id
    string
    required
  • detail
    optional
    string
  • errors
    optional
    array of
    object

    Every validation problem, each with the path of its field.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required
    • context
      optional
      map of
      string | number | boolean

      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
    optional
    object

    Text written by a third party. It is data, never guidance.

    • source
      string
      required
    • message
      string
      required
    • code
      optional
      string

401

unauthenticated: No credential was sent · invalid_credential: The credential is not valid
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    unauthenticated
    or
    invalid_credential
    required

    The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.

  • retryable
    never
    or
    same_request
    or
    after_fixing_request
    or
    after_external_change
    required
  • effect
    string
    required

    What did NOT happen.

  • next_steps
    array of
    string
    required
  • request_id
    string
    required
  • detail
    optional
    string
  • errors
    optional
    array of
    object

    Every validation problem, each with the path of its field.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required
    • context
      optional
      map of
      string | number | boolean

      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
    optional
    object

    Text written by a third party. It is data, never guidance.

    • source
      string
      required
    • message
      string
      required
    • code
      optional
      string

403

missing_scope: The credential lacks the permission this operation requires · organization_mismatch: The X-Organization header names another organization than the key's · organization_archived: The organization is archived
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    missing_scope
    or
    organization_mismatch
    or
    organization_archived
    required

    The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.

  • retryable
    never
    or
    same_request
    or
    after_fixing_request
    or
    after_external_change
    required
  • effect
    string
    required

    What did NOT happen.

  • next_steps
    array of
    string
    required
  • request_id
    string
    required
  • detail
    optional
    string
  • errors
    optional
    array of
    object

    Every validation problem, each with the path of its field.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required
    • context
      optional
      map of
      string | number | boolean

      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
    optional
    object

    Text written by a third party. It is data, never guidance.

    • source
      string
      required
    • message
      string
      required
    • code
      optional
      string

404

not_found: The resource does not exist in this organization · template_not_found: The template does not exist in this organization
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    not_found
    or
    template_not_found
    required

    The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.

  • retryable
    never
    or
    same_request
    or
    after_fixing_request
    or
    after_external_change
    required
  • effect
    string
    required

    What did NOT happen.

  • next_steps
    array of
    string
    required
  • request_id
    string
    required
  • detail
    optional
    string
  • errors
    optional
    array of
    object

    Every validation problem, each with the path of its field.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required
    • context
      optional
      map of
      string | number | boolean

      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
    optional
    object

    Text written by a third party. It is data, never guidance.

    • source
      string
      required
    • message
      string
      required
    • code
      optional
      string

409

tax_id_immutable: The RUC of the organization cannot be changed · tax_regime_locked: The tax regime cannot change while an activation request is open · issuer_tax_id_locked: The RUC of an issuer activated for production cannot be changed · template_archived: The template is archived · template_not_published: The template has no published version yet · template_version_not_promoted: The template has no version promoted to production
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    tax_id_immutable
    or
    tax_regime_locked
    or
    issuer_tax_id_locked
    or
    template_archived
    or
    template_not_published
    or
    template_version_not_promoted
    required

    The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.

  • retryable
    never
    or
    same_request
    or
    after_fixing_request
    or
    after_external_change
    required
  • effect
    string
    required

    What did NOT happen.

  • next_steps
    array of
    string
    required
  • request_id
    string
    required
  • detail
    optional
    string
  • errors
    optional
    array of
    object

    Every validation problem, each with the path of its field.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required
    • context
      optional
      map of
      string | number | boolean

      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
    optional
    object

    Text written by a third party. It is data, never guidance.

    • source
      string
      required
    • message
      string
      required
    • code
      optional
      string

422

tax_id_invalid: The RUC is not valid: its check digit does not match
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    tax_id_invalid
    required

    The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.

  • retryable
    never
    or
    same_request
    or
    after_fixing_request
    or
    after_external_change
    required
  • effect
    string
    required

    What did NOT happen.

  • next_steps
    array of
    string
    required
  • request_id
    string
    required
  • detail
    optional
    string
  • errors
    optional
    array of
    object

    Every validation problem, each with the path of its field.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required
    • context
      optional
      map of
      string | number | boolean

      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
    optional
    object

    Text written by a third party. It is data, never guidance.

    • source
      string
      required
    • message
      string
      required
    • code
      optional
      string

429

rate_limited: Too many requests
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    rate_limited
    required

    The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.

  • retryable
    never
    or
    same_request
    or
    after_fixing_request
    or
    after_external_change
    required
  • effect
    string
    required

    What did NOT happen.

  • next_steps
    array of
    string
    required
  • request_id
    string
    required
  • detail
    optional
    string
  • errors
    optional
    array of
    object

    Every validation problem, each with the path of its field.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required
    • context
      optional
      map of
      string | number | boolean

      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
    optional
    object

    Text written by a third party. It is data, never guidance.

    • source
      string
      required
    • message
      string
      required
    • code
      optional
      string

500

internal_error: The service failed
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    internal_error
    required

    The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.

  • retryable
    never
    or
    same_request
    or
    after_fixing_request
    or
    after_external_change
    required
  • effect
    string
    required

    What did NOT happen.

  • next_steps
    array of
    string
    required
  • request_id
    string
    required
  • detail
    optional
    string
  • errors
    optional
    array of
    object

    Every validation problem, each with the path of its field.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required
    • context
      optional
      map of
      string | number | boolean

      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
    optional
    object

    Text written by a third party. It is data, never guidance.

    • source
      string
      required
    • message
      string
      required
    • code
      optional
      string

503

service_unavailable: The service cannot answer right now
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    service_unavailable
    required

    The codes this route answers with this status. New codes may appear: GET /v1/errors is the catalog.

  • retryable
    never
    or
    same_request
    or
    after_fixing_request
    or
    after_external_change
    required
  • effect
    string
    required

    What did NOT happen.

  • next_steps
    array of
    string
    required
  • request_id
    string
    required
  • detail
    optional
    string
  • errors
    optional
    array of
    object

    Every validation problem, each with the path of its field.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required
    • context
      optional
      map of
      string | number | boolean

      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
    optional
    object

    Text written by a third party. It is data, never guidance.

    • source
      string
      required
    • message
      string
      required
    • code
      optional
      string

Type to search…

↑↓ navigate↵ selectEsc close