Skip to content
Navigation

Send the activation request with the two SUNAT screenshots

For an organization on the list. The RUC and the tax regime come from the issuer (tax_regime must be set and the RUC verified); the RUC is looked up again NOW and must be ACTIVO and HABIDO. files: one sunat_pse and one sunat_ose screenshot of SUNAT Operaciones en Línea where the provider shows as enabled, each PNG, JPEG, WebP or PDF (read from the bytes) up to 5 MB, in base64. The command line builds it: invoicing call POST /v1/production_activation --attach sunat_pse=./pse.png --attach sunat_ose=./ose.png. One request in progress per organization. Checked in this order: the screenshots, on the list, the issuer, tax_regime, RUC verified, nothing in progress, the lookup. On the LIVE organization (a test organization answers validation_failed, live_organization_required).

POST
https://api.invox.page/v1/production_activation

Authorization

  • bearer
    HTTP
    required

Header parameters

  • Idempotency-Key
    string
    required

    A unique value per operation. Reuse it when retrying the same operation.

    maxLength: 255
  • 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

  • files
    array of
    object
    required

    The two screenshots of SUNAT Operaciones en Línea, one of each kind.

    • kind
      sunat_pse
      or
      sunat_ose
      required

      sunat_pse: SUNAT shows the provider enabled as PSE of this RUC. sunat_ose: the same, as OSE.

    • content_type
      string
      required

      image/png, image/jpeg, image/webp or application/pdf: what the bytes ARE. It is checked against the bytes.

      maxLength: 100 · minLength: 1
    • data_base64
      string
      required

      The bytes of the file, base64. At most 5 MB once decoded.

      maxLength: 12582912 · minLength: 1
  • contact_email
    optional
    string

    Who is told about this request. Default: the contact of the accepted access request.

    maxLength: 255

Returns

200

A retry with the same Idempotency-Key: the same request as it is now.

JSON
  • object
    string
    required
  • id
    string
    required
  • status
    submitted
    or
    changes_requested
    or
    approved
    or
    activated
    or
    rejected
    or
    withdrawn
    required

    submitted · changes_requested · approved (enrolment in progress) · activated · rejected · withdrawn.

  • tax_id
    string
    required

    The RUC and the regime of the issuer when it was sent.

  • tax_regime
    string
    required
  • ruc
    object
    required

    What SUNAT data said of the RUC when it was (re)sent.

    • status
      string
      required
    • condition
      string
      required
    • checked_at
      string
      required
  • contact_email
    string
    required
  • review_note
    string | null
    required

    What to change (changes_requested) or why it was rejected. Written by the staff.

  • files
    array of
    object
    required
    • id
      string
      required
    • kind
      sunat_pse
      or
      sunat_ose
      required
    • content_type
      string
      required
    • size_bytes
      integer
      required
      maximum: 9007199254740991 · minimum: -9007199254740991
    • sha256
      string
      required
    • review_status
      pending
      or
      valid
      or
      invalid
      required

      pending until the staff reviews it; then valid or invalid (with review_note).

    • review_note
      string | null
      required
    • uploaded_at
      string
      required
    • content_path
      string
      required

      The route of this API that serves the bytes, with your credential.

  • created_at
    string
    required
  • updated_at
    string
    required
  • approved_at
    string | null
    required
  • activated_at
    string | null
    required
  • rejected_at
    string | null
    required
  • what_next
    string
    required

201

The request, submitted, with each screenshot pending review.

JSON
  • object
    string
    required
  • id
    string
    required
  • status
    submitted
    or
    changes_requested
    or
    approved
    or
    activated
    or
    rejected
    or
    withdrawn
    required

    submitted · changes_requested · approved (enrolment in progress) · activated · rejected · withdrawn.

  • tax_id
    string
    required

    The RUC and the regime of the issuer when it was sent.

  • tax_regime
    string
    required
  • ruc
    object
    required

    What SUNAT data said of the RUC when it was (re)sent.

    • status
      string
      required
    • condition
      string
      required
    • checked_at
      string
      required
  • contact_email
    string
    required
  • review_note
    string | null
    required

    What to change (changes_requested) or why it was rejected. Written by the staff.

  • files
    array of
    object
    required
    • id
      string
      required
    • kind
      sunat_pse
      or
      sunat_ose
      required
    • content_type
      string
      required
    • size_bytes
      integer
      required
      maximum: 9007199254740991 · minimum: -9007199254740991
    • sha256
      string
      required
    • review_status
      pending
      or
      valid
      or
      invalid
      required

      pending until the staff reviews it; then valid or invalid (with review_note).

    • review_note
      string | null
      required
    • uploaded_at
      string
      required
    • content_path
      string
      required

      The route of this API that serves the bytes, with your credential.

  • created_at
    string
    required
  • updated_at
    string
    required
  • approved_at
    string | null
    required
  • activated_at
    string | null
    required
  • rejected_at
    string | null
    required
  • what_next
    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 · idempotency_key_required: This write needs an Idempotency-Key header
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    organization_required
    or
    validation_failed
    or
    malformed_request
    or
    idempotency_key_required
    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
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    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

production_access_required: This organization is not on the production access list · issuer_not_configured: The organization has no issuer yet · tax_regime_required: The tax regime of the issuer is not set · ruc_not_verified: The RUC of the organization has not been verified yet · activation_request_open: This organization already has an activation request in progress · ruc_not_active: The RUC is not active at SUNAT · ruc_not_habido: The RUC is not HABIDO at SUNAT
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    production_access_required
    or
    issuer_not_configured
    or
    tax_regime_required
    or
    ruc_not_verified
    or
    activation_request_open
    or
    ruc_not_active
    +1 more
    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

413

evidence_too_large: A screenshot is larger than 5 MB
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    evidence_too_large
    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

415

evidence_type_not_allowed: A screenshot is not a PNG, JPEG, WebP image or a PDF
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    evidence_type_not_allowed
    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

idempotency_key_reused: This Idempotency-Key was already used with a different request · evidence_missing: A required screenshot is missing
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    idempotency_key_reused
    or
    evidence_missing
    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 · ruc_check_unavailable: The RUC could not be checked right now
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • code
    service_unavailable
    or
    ruc_check_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