Skip to content

Issuer Document Types

Manage which SRI document types an issuer is allowed to process. Document type eligibility is checked at invoice creation time — attempting to create a document of a disallowed type returns 400.

Authentication

Authorization: Bearer <api-key>

All endpoints below take the issuer id as a URL parameter and verify it belongs to your tenant before applying any change.


List document types

GET /v1/issuers/:id/document-types

Returns the active document types for the named issuer.

Path parameters

ParameterDescription
idNumeric issuer id (from GET /v1/issuers)

Response

json
{
  "ok": true,
  "documentTypes": ["01"]
}

Add a document type

POST /v1/issuers/:id/document-types

Enables a new document type for the issuer. If the type was previously removed, it is reactivated.

Path parameters

ParameterDescription
idNumeric issuer id

Request body

json
{
  "documentType": "01"
}
FieldTypeRequiredDescription
documentTypestringYesSRI document type code (see supported types below)

Response

Returns the full updated list of active document types.

json
{
  "ok": true,
  "documentTypes": ["01"]
}

Errors

StatusCodeWhen
400VALIDATION_ERRORdocumentType is missing or not a supported type
403FORBIDDENIssuer belongs to a different tenant
404NOT_FOUNDIssuer id does not exist

Remove a document type

DELETE /v1/issuers/:id/document-types/:code

Disables a document type for the issuer. The last active type cannot be removed.

Path parameters

ParameterDescription
idNumeric issuer id
codeDocument type code to remove (e.g. 01)

Response

Returns the full updated list of active document types.

json
{
  "ok": true,
  "documentTypes": ["01"]
}

Errors

StatusCodeWhen
400VALIDATION_ERRORcode is not a supported type
400BAD_REQUESTAttempting to remove the last active document type
403FORBIDDENIssuer belongs to a different tenant
404NOT_FOUNDIssuer id does not exist, or the document type is not currently active for this issuer

Supported document types

CodeDescription
01Factura (Invoice)

Comprobify API Documentation