Get Document Type

API allows taxpayer ERP system to retrieve the details of single document type and its versions.

Get Document Types Get Document Type Version

Overview

API allows caller to get more details about a single document type by returning list of its versions and also active and historical workflow parameters that define limits for document submission, cancellation and rejection.

Signature

API is REST based API that takes unique ID of the document type as URL parameter and returns document type object with additional details.

Signature: GET /api/v1.0/documenttypes/{id}

Inputs

This API accepts standard eInvoicing API header parameters for authenticated call.

URL parameter Type Description Value example
id Number Unique ID of existing document type 45

Outputs

Successful Response

API returns HTTP status code 200.

The resulting structure is a single object of type DocumentType.

Document Type contains:

Output parameter Type Description Value example
id Number Unique identifier of the document type 45
name String Unique name of the document type i (for invoice), c (for credit note), d (for debit note)
description String Description of the document type Credit note
activeFrom Date Date when the activity of the document type started 2015-02-13T13:15Z
activeTo Date Optional: date when the activity of the document type ends 2027-03-01T00:00:00Z
documentTypeVersions Document Type Version[] Array of document type version summary objects 1 or more array values
workflowParameters Workflow Parameter[] Array of workflow parameters Array of objects

Document Type Version contains:

Output parameter Type Description Value example
id Number Unique identifier of the document type version 454
name String Name of the document type version within the document type 1.0
description String Description of the document type version Credit note version 1.1
versionNumber Decimal Unique version number of the document type version 1.1
status String Status of the document type version - “published”, “deactivated” published
activeFrom Date Date when the activity of the document type version started 2015-02-13T13:15Z
activeTo Date Optional: date when the activity of the document type version sends/when it was deactivated 2027-03-01T00:00:00Z

Workflow Parameter contains:

Output parameter Type Description Value example
id Number Unique id of the parameter for this document type 124
parameter String Name of the parameter Rejection time limit in hours
value Number Parameter value 72
activeFrom Date Date when the activity of the parameter started 2015-02-13T13:15Z
activeTo Date Optional: date when the activity of the parameter ended 2027-03-01T00:00:00Z

Error Response

Error situations are reported back by this API through the standard error response.

No custom error codes are provided by this API.

Additional considerations

To get the ID used to call this API, taxpayer system needs to first call API returning list of the document types.