Etaxgo V2
  1. Documents
  • Authentication
    • Get access token (OAuth 2.0 Client Credentials)
      POST
  • Documents
    • Full document detail + line items + linked docs
      GET
    • Stream signed PDF from blob storage
      GET
    • Create a Cancellation Note (T07)
      POST
    • Create a Credit Note (81)
      POST
    • Create a Debit Note (80)
      POST
    • Create a Replacement Tax Invoice (388)
      POST
    • Create a tax invoice (e-Tax Invoice, type 388)
      POST
  • Dashboard
    • Advanced document search with date range
      POST
  • Locations
    • Resolve Thai address codes (sub-district / district / province + post code)
      GET
  • Schemas
    • AdjustmentDocRequest
    • BillDiscountItem
    • CancelDocRequest
    • ErrorResponse
    • LocationResult
    • LocationSearchResponse
    • OAuthTokenResponse
    • OpenAPIBuyer
    • OpenAPIBuyerDelivery
    • OpenAPICreateResponse
    • OpenAPICreateValidationError
    • OpenAPIDiscount
    • OpenAPIDocumentDetails
    • OpenAPIDocumentSellerRef
    • OpenAPILineItem
    • OpenAPISellerRef
    • OpenAPITaxInvoiceHeader
    • OpenAPITaxInvoiceRequest
    • PaginatedResponse
    • PaginationMeta
    • ReplacementDocRequest
    • TokenRequest
  1. Documents

Create a tax invoice (e-Tax Invoice, type 388)

POST
/v1/documents/tax-invoice
Documents
Creates a Thai e-Tax Invoice, generates the official PDF, digitally signs it, and (if your
company has delivery turned on) emails/SMSes it to the buyer.
What you send: the buyer, the line items, and a few options. That's it.
What we fill in for you (do not send these):
Seller — taken from your account. You only confirm it via header.seller.taxId.
VAT and all totals — computed from your line prices and isVatIncluded. Never send tax amounts.
Document number — auto-generated if you leave documentNo empty.
The response is synchronous: on success you get back the finished, signed PDF inline as
Base64 (data.pdf), with status: "Completed".
Errors (HTTP 422, no document created):
VALIDATION_FAILED — a field is missing or wrong; error.fields lists exactly which.
SELLER_MISMATCH — seller.taxId is not your own company's tax id (you can only invoice as yourself).
Warnings (still HTTP 200, document created): e.g. a bad delivery email — returned in
data.warnings; the invoice is still created, only the email/SMS is skipped.
Tip: resolve the buyer's address codes (sub-district / district / province / post code) with
GET /v1/locations/search before calling this.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Document created
Bodyapplication/json

🟠409
🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/v1/documents/tax-invoice' \
--header 'Idempotency-Key;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "header": {
        "buyer": {
            "branchNo": "00000",
            "buildingNumber": "123",
            "countryCode": "TH",
            "delivery": {
                "email": "[email protected]"
            },
            "districtCode": "1005",
            "name": "บริษัท ตัวอย่าง จำกัด",
            "postCode": "10110",
            "provinceCode": "10",
            "street": "สุขุมวิท",
            "subDistrictCode": "100502",
            "taxId": "0105556000000",
            "taxIdSchemeId": "TXID"
        },
        "documentDetails": {
            "isVatIncluded": false,
            "issueDate": "2026-06-17T10:30:00+07:00",
            "templateNo": "INV-7QX2K9"
        }
    },
    "items": [
        {
            "lineId": 1,
            "productName": "บริการที่ปรึกษา",
            "quantity": 2,
            "unit": "ครั้ง",
            "unitPrice": 1000,
            "vatTypeCode": "VAT"
        }
    ],
    "remark": "ชำระภายใน 30 วัน"
}'
Response Response Example
200 - Example 1
{
    "data": {
        "documentNo": "INV-2026-0001",
        "documentType": "388",
        "pdf": "string",
        "status": "Completed",
        "warnings": [
            {
                "code": "string",
                "message": "string"
            }
        ]
    },
    "error": null,
    "success": true
}
Modified at 2026-06-19 05:23:26
Previous
Create a Replacement Tax Invoice (388)
Next
Advanced document search with date range
Built with