API Reference
Get Document Detail

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

ParameterTypeDescriptionRequired
document_idStringThe 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": "SENT",
    "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

FieldDescription
document_idThe unique identifier for the document.
document_numberThe unique number assigned to the document.
supplier_idThe identifier for the supplier.
supplier_company_name_khThe supplier's company name in Khmer.
supplier_company_name_enThe supplier's company name in English.
supplier_vattinThe VAT identification number of the supplier.
customer_idThe identifier for the customer.
customer_company_name_enThe customer's company name in English.
customer_company_name_khThe customer's company name in Khmer.
customer_vattinThe VAT identification number of the customer.
statusThe status of the document (e.g., SENT).
issue_dateThe date when the document was issued.
due_dateThe due date for payment.
pdf_fileThe file path to the PDF document associated with the invoice.
created_atThe date and time when the document was created.
updated_atThe date and time when the document was last updated.
currencyThe currency used for the transaction.
tax_inclusive_amountThe total amount including tax.
document_typeThe type of document (e.g., INVOICE).
reference_document_idThe identifier for any reference document.
reference_document_numberThe number assigned to any reference document.
documentThe 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.