Get Document via Document Number

Retrieve a single e-invoice document by its document number

Request Method

GET

Request URL

https://api.eu.cleartax.com/be/einvoice/v1/documents

Request Headers

Parameter
Data Type
Field Validations
Description

x-cleartax-auth-token

String

Cannot be empty

Mandatory.

User auth token.

x-clear-branch

String

Should be a valid branch from the user account

Optional.

Branch name (store name) added in the user account.

x-clear-vat

String

Cannot be empty

Mandatory.

VAT of the entity

x-request-id

UUID

Should be unique for every request

Optional.

Unique request ID.

Request Path Params

There are no path parameters for this API.

Request Query Params

Parameter
Data Type
Field Validations
Description

einvoice-type

ENUM

PURCHASE

Mandatory.

It is a fixed value and must be passed as PURCHASE.

document-number

String

-

Mandatory.

Document number needs to be provided mandatorily for fetching doc

Request Body

There will be no request body for this API.

Response Status Codes

HTTP Status Code
Description

200

For a successful retrieval

400

For any kind of validation issues

401

If the user is not authenticated for the operation

403

If the user is not authorized for the operation

5XX

Unhandled exception

Response Schema

This API will return a JSON response compliant with the Peppol-defined standard for Sales Documents.

To view the schema, use this Link.

Sample Request & Response

Request

NA

Response - Success:

HTTP Status Code: 200

Response - Error:

HTTP Status Code: 404

HTTP Status Code: 400

HTTP Status Code: 403

API Limitations

Currently there are no known validations for this API.

API Constraints

  1. This API needs to be authenticated with a valid user authentication token. If the auth token is not present or is invalid, the API will return HTTP Status Code 401.

  2. If the auth token is valid, but the user does not have the authorization to get a list of documents, then the API will return HTTP Status Code 403. The user, whose auth token is used, should have an Admin role.

  3. A valid document number should be passed that exists in db, else 404 will be returned.

Last updated

Was this helpful?