Get Document Detail
Description
This endpoint is get the detail information of a document via document_id.
GET {BaseURL}/api/v1/document/{document_id}
Content-Type: application/json
Authorization: Bearer {access_token}
Method
GET
Headers
- Content-Type:
application/json
- Authorization:
Bearer {access_token}
Path Parameters
Parameter | Type | Description | Required |
---|---|---|---|
document_id | String | The unique identifier of the document. | Yes |
Response
HTTP Status 200 (OK)
{
"document_id": "df5dcf78-e78b-4396-87bb-2d2a44c1302e",
"document_number": "24030192110",
"supplier_id": "KHUID10015172",
"supplier_company_name_kh": "នាសារ៉ាថ្មី ឯ.ក",
"supplier_company_name_en": "NEASARANEW CO., LTD.",
"supplier_vattin": "23144122",
"customer_id": "KHUID10015172",
"customer_company_name_en": "NEASARANEW CO., LTD.",
"customer_company_name_kh": "នាសារ៉ាថ្មី ឯ.ក",
"customer_vattin": "23144122",
"status": "DELIVERED",
"issue_date": "2024-03-05T00:00:00.000Z",
"due_date": "2024-04-05T00:00:00.000Z",
"pdf_file": "documents/df5dcf78-e78b-4396-87bb-2d2a44c1302e.pdf",
"created_at": "2024-03-07T07:16:04.991Z",
"updated_at": "2024-03-07T07:16:07.859Z",
"currency": "USD",
"tax_inclusive_amount": 11,
"document_type": "INVOICE",
"reference_document_id": null,
"reference_document_number": null,
"document": "PEludm9pY2UgeG1sbnM6Y2FjPSJ1cm46b2FzaXM6bmFtZXM6c3BlY2lmaWNhdGlvbjp1Ymw6c2NoZW1hOnhzZDpDb21..."
}
Response Fields
Field | Description |
---|---|
document_id | The unique identifier for the document. |
document_number | The unique number assigned to the document. |
supplier_id | The identifier for the supplier. |
supplier_company_name_kh | The supplier's company name in Khmer. |
supplier_company_name_en | The supplier's company name in English. |
supplier_vattin | The VAT identification number of the supplier. |
customer_id | The identifier for the customer. |
customer_company_name_en | The customer's company name in English. |
customer_company_name_kh | The customer's company name in Khmer. |
customer_vattin | The VAT identification number of the customer. |
status | The status of the document (e.g., VALID). |
issue_date | The date when the document was issued. |
due_date | The due date for payment. |
pdf_file | The file path to the PDF document associated with the invoice. |
created_at | The date and time when the document was created. |
updated_at | The date and time when the document was last updated. |
currency | The currency used for the transaction. |
tax_inclusive_amount | The total amount including tax. |
document_type | The type of document (e.g., INVOICE). |
reference_document_id | The identifier for any reference document. |
reference_document_number | The number assigned to any reference document. |
document | The Base64 encoded representation of the XML document. |
HTTP Status 404 (Not Found)
This response occurs when the specified document ID does not exist.
Notes
- The endpoint allows downloading the PDF file of a document identified by its ID.
- Ensure that the client handles the file download appropriately.