Gofive OpenAPI
empeoVenioeTaxGo
empeoVenioeTaxGo
  1. Document Management
  • Auth Request
    • Auth Token
      POST
  • Document Management
    • Validate Documents
      • Validate Documents Json
    • Delivery Service
      • Delivery Service Resend
    • Create Document JSON
      POST
    • List Sellers
      GET
    • Create Tax Invoice
      POST
    • Update Tax Invoice
      PUT
    • Create Debit Note
      POST
    • Create Credit Note
      POST
    • Create Invoice
      POST
    • Create Receipt
      POST
    • Create Invoice and Tax Invoice
      POST
    • Create Receipt and Tax Invoice
      POST
    • Create Delivery Order and Tax Invoice
      POST
    • Create Abbreviated Tax Invoice
      POST
    • Create Receipt Abbreviated Tax Invoice
      POST
    • Document Raw Data
      POST
    • Download Document
      POST
    • Download Document By Id
      GET
    • Get Batch By Id
      GET
    • List Provinces
      GET
    • List Districts
      GET
    • List Sub Districts
      GET
    • List Posts
      GET
  1. Document Management

Create Document JSON

POST
https://api.gofive.co.th/etaxgo/Documents/Json

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params
Ocp-Apim-Subscription-Key
string 
required
Example:
รหัส subscription key ของลูกค้า
Content-Type
string 
optional
Example:
application/json
Body Params application/json
Documents
array [object {3}] 
required
DeliveryInfo
object 
optional
Header
object 
required
Details
array [object {5}] 
required
Example
{
    "Documents": [
        {
            "DeliveryInfo": {
                "EmailAddress1": "string",
                "EmailAddress2": "string",
                "SMSTelNo1": "string",
                "Password": "string",
                "PrintDeliveryType": "string",
                "EDeliveryType": "string",
                "IsAlertBySMS": "string",
                "TemplateToken": "string",
                "CustomAction": "string"
            },
            "Header": {
                "ExchangedDocument": {
                    "Id": "string",
                    "Name": "string",
                    "TypeCode": "string",
                    "IssueDateTime": "string",
                    "Purpose": "string",
                    "PurposeCode": "string",
                    "CreationDateTime": "string",
                    "Subject": "string",
                    "Content": "string"
                },
                "SellerTradeParty": {
                    "Id": "string",
                    "Name": "string",
                    "TaxId": "string",
                    "Postcode": "string",
                    "BuildingName": "string",
                    "AddressLine1": "string",
                    "AddressLine2": "string",
                    "Line3": "string",
                    "Line4": "string",
                    "Line5": "string",
                    "StreetName": "string",
                    "CityName": "string",
                    "CitySubDivisionName": "string",
                    "CountryId": "string",
                    "CountrySubDivisionName": "string",
                    "BuildingNumber": "string"
                },
                "BuyerTradeParty": {
                    "Id": "string",
                    "Name": "string",
                    "TaxId": "string",
                    "Postcode": "string",
                    "BuildingName": "string",
                    "AddressLine1": "string",
                    "AddressLine2": "string",
                    "Line3": "string",
                    "Line4": "string",
                    "Line5": "string",
                    "StreetName": "string",
                    "CityName": "string",
                    "CitySubDivisionName": "string",
                    "CountryId": "string",
                    "CountrySubDivisionName": "string",
                    "BuildingNumber": "string"
                },
                "AdditionalReferencedDocument": {
                    "IssueAssignedId": "string",
                    "IssueDateTime": "string",
                    "ReferenceTypeCode": "string"
                },
                "ApplicableTradeTax": {
                    "CurrencyCode": "string",
                    "TypeCode": "string",
                    "CalculatedRate": "string",
                    "BasisAmount": "string",
                    "CalculatedAmount": "string"
                },
                "SpecifiedTradeAllowance": {
                    "ChargeIndicator": "string",
                    "ActualAmount": "string",
                    "ReasonCode": "string",
                    "Reason": "string"
                },
                "SpecifiedTradeCharge": {
                    "ChargeIndicator": "string",
                    "ActualAmount": "string",
                    "ReasonCode": "string",
                    "Reason": "string"
                },
                "SpecifiedTradeSettlementHeaderMonetarySummation": {
                    "OriginalInformationAmount": "string",
                    "LineTotalAmount": "string",
                    "DifferenceSalesInformationAmount": "string",
                    "AllowanceTotalAmount": "string",
                    "ChargeTotalAmount": "string",
                    "TaxBasisTotalAmount": "string",
                    "TaxTotalAmount": "string",
                    "GrandTotalAmount": "string"
                },
                "Custom": {
                    "Custom01": "string",
                    "Custom02": "string",
                    "Custom03": "string",
                    "Custom04": "string",
                    "Custom05": "string",
                    "Custom06": "string",
                    "Custom07": "string",
                    "Custom08": "string",
                    "Custom09": "string",
                    "Custom10": "string",
                    "Custom11": "string",
                    "Custom12": "string",
                    "Custom13": "string",
                    "Custom14": "string",
                    "Custom15": "string",
                    "Custom16": "string",
                    "Custom17": "string",
                    "Custom18": "string",
                    "Custom19": "string",
                    "Custom20": "string",
                    "Custom21": "string",
                    "Custom22": "string",
                    "Custom23": "string",
                    "Custom24": "string",
                    "Custom25": "string",
                    "Custom26": "string",
                    "Custom27": "string",
                    "Custom28": "string",
                    "Custom29": "string",
                    "Custom30": "string"
                }
            },
            "Details": [
                {
                    "IncludedSupplyChainTradeLineItem": {
                        "LineId": "string",
                        "Id": "string",
                        "Name": "string",
                        "ChargeAmount": "string",
                        "BilledQuantity": "string",
                        "BilledQuantityUnit": "string"
                    },
                    "ApplicableTradeTax": {
                        "TypeCode": "string",
                        "CalculatedRate": "string",
                        "BasisAmount": "string",
                        "CalculatedAmount": "string"
                    },
                    "SpecifiedTradeAllowance": {
                        "ChargeIndicator": "string",
                        "ActualAmount": "string",
                        "ReasonCode": "string",
                        "Reason": "string"
                    },
                    "SpecifiedTradeSettlementMonetarySummation": {
                        "TaxTotalAmount": "string",
                        "NetLineTotalAmount": "string",
                        "NetIncludingTaxesLineTotalAmount": "string"
                    },
                    "Custom": {
                        "Custom01": "string",
                        "Custom02": "string",
                        "Custom03": "string",
                        "Custom04": "string",
                        "Custom05": "string",
                        "Custom06": "string",
                        "Custom07": "string",
                        "Custom08": "string",
                        "Custom09": "string",
                        "Custom10": "string"
                    }
                }
            ]
        }
    ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.gofive.co.th/etaxgo/Documents/Json' \
--header 'Ocp-Apim-Subscription-Key: รหัส subscription key ของลูกค้า' \
--header 'Content-Type: application/json' \
--data-raw '{
    "Documents": [
        {
            "DeliveryInfo": {
                "EmailAddress1": "string",
                "EmailAddress2": "string",
                "SMSTelNo1": "string",
                "Password": "string",
                "PrintDeliveryType": "string",
                "EDeliveryType": "string",
                "IsAlertBySMS": "string",
                "TemplateToken": "string",
                "CustomAction": "string"
            },
            "Header": {
                "ExchangedDocument": {
                    "Id": "string",
                    "Name": "string",
                    "TypeCode": "string",
                    "IssueDateTime": "string",
                    "Purpose": "string",
                    "PurposeCode": "string",
                    "CreationDateTime": "string",
                    "Subject": "string",
                    "Content": "string"
                },
                "SellerTradeParty": {
                    "Id": "string",
                    "Name": "string",
                    "TaxId": "string",
                    "Postcode": "string",
                    "BuildingName": "string",
                    "AddressLine1": "string",
                    "AddressLine2": "string",
                    "Line3": "string",
                    "Line4": "string",
                    "Line5": "string",
                    "StreetName": "string",
                    "CityName": "string",
                    "CitySubDivisionName": "string",
                    "CountryId": "string",
                    "CountrySubDivisionName": "string",
                    "BuildingNumber": "string"
                },
                "BuyerTradeParty": {
                    "Id": "string",
                    "Name": "string",
                    "TaxId": "string",
                    "Postcode": "string",
                    "BuildingName": "string",
                    "AddressLine1": "string",
                    "AddressLine2": "string",
                    "Line3": "string",
                    "Line4": "string",
                    "Line5": "string",
                    "StreetName": "string",
                    "CityName": "string",
                    "CitySubDivisionName": "string",
                    "CountryId": "string",
                    "CountrySubDivisionName": "string",
                    "BuildingNumber": "string"
                },
                "AdditionalReferencedDocument": {
                    "IssueAssignedId": "string",
                    "IssueDateTime": "string",
                    "ReferenceTypeCode": "string"
                },
                "ApplicableTradeTax": {
                    "CurrencyCode": "string",
                    "TypeCode": "string",
                    "CalculatedRate": "string",
                    "BasisAmount": "string",
                    "CalculatedAmount": "string"
                },
                "SpecifiedTradeAllowance": {
                    "ChargeIndicator": "string",
                    "ActualAmount": "string",
                    "ReasonCode": "string",
                    "Reason": "string"
                },
                "SpecifiedTradeCharge": {
                    "ChargeIndicator": "string",
                    "ActualAmount": "string",
                    "ReasonCode": "string",
                    "Reason": "string"
                },
                "SpecifiedTradeSettlementHeaderMonetarySummation": {
                    "OriginalInformationAmount": "string",
                    "LineTotalAmount": "string",
                    "DifferenceSalesInformationAmount": "string",
                    "AllowanceTotalAmount": "string",
                    "ChargeTotalAmount": "string",
                    "TaxBasisTotalAmount": "string",
                    "TaxTotalAmount": "string",
                    "GrandTotalAmount": "string"
                },
                "Custom": {
                    "Custom01": "string",
                    "Custom02": "string",
                    "Custom03": "string",
                    "Custom04": "string",
                    "Custom05": "string",
                    "Custom06": "string",
                    "Custom07": "string",
                    "Custom08": "string",
                    "Custom09": "string",
                    "Custom10": "string",
                    "Custom11": "string",
                    "Custom12": "string",
                    "Custom13": "string",
                    "Custom14": "string",
                    "Custom15": "string",
                    "Custom16": "string",
                    "Custom17": "string",
                    "Custom18": "string",
                    "Custom19": "string",
                    "Custom20": "string",
                    "Custom21": "string",
                    "Custom22": "string",
                    "Custom23": "string",
                    "Custom24": "string",
                    "Custom25": "string",
                    "Custom26": "string",
                    "Custom27": "string",
                    "Custom28": "string",
                    "Custom29": "string",
                    "Custom30": "string"
                }
            },
            "Details": [
                {
                    "IncludedSupplyChainTradeLineItem": {
                        "LineId": "string",
                        "Id": "string",
                        "Name": "string",
                        "ChargeAmount": "string",
                        "BilledQuantity": "string",
                        "BilledQuantityUnit": "string"
                    },
                    "ApplicableTradeTax": {
                        "TypeCode": "string",
                        "CalculatedRate": "string",
                        "BasisAmount": "string",
                        "CalculatedAmount": "string"
                    },
                    "SpecifiedTradeAllowance": {
                        "ChargeIndicator": "string",
                        "ActualAmount": "string",
                        "ReasonCode": "string",
                        "Reason": "string"
                    },
                    "SpecifiedTradeSettlementMonetarySummation": {
                        "TaxTotalAmount": "string",
                        "NetLineTotalAmount": "string",
                        "NetIncludingTaxesLineTotalAmount": "string"
                    },
                    "Custom": {
                        "Custom01": "string",
                        "Custom02": "string",
                        "Custom03": "string",
                        "Custom04": "string",
                        "Custom05": "string",
                        "Custom06": "string",
                        "Custom07": "string",
                        "Custom08": "string",
                        "Custom09": "string",
                        "Custom10": "string"
                    }
                }
            ]
        }
    ]
}'

Responses

🟢200Success
application/json
Body
validate
boolean 
required
ผลตรวจสอบข้อมูล
validateEmail
boolean 
required
ผลตรวจสอบอีเมล
validateSms
boolean 
required
ผลตรวจสอบเบอร์สำหรับส่ง SMS
errorMessage
string  | null 
required
ข้อความ Error: แจ้งผลการตรวจสอบข้อมูลล้มเหลง (ข้อมูลไม่ตรงหรือผิด) โดยจะบอกข้อผิดพลาดทั้งหมดในข้อมูลที่ส่งมา
warningMessage
string  | null 
required
ข้อความเตือน: ไม่มีผลต่อการสร้างเอกสาร แต่จะกระทบการทำงานอื่น ๆ เช่น Email ไม่ถูกต้อง ทำให้ไม่สามารถส่ง Email ได้
batchId
string  | null 
required
pdf
string  | null 
required
ไฟล์ PDF ที่ถูก Encode มาเป็น Base64
isSuccess
boolean 
required
สร้างเอกสารสำเร็จหรือไม่
printQty
number  | null 
required
templateToken
string  | null 
required
Example
{
    "validate": true,
    "validateEmail": true,
    "validateSms": true,
    "errorMessage": null,
    "warningMessage": null,
    "batchId": null,
    "pdf": "...base64 encoded pdf...",
    "isSuccess": true,
    "printQty": null,
    "templateToken": null
}
🟢200OK
🟠401Unauthorized
🟠403Forbidden
🟠401User authentication required V2.
Modified at 2025-01-03 11:44:06
Previous
Delivery Service Resend
Next
List Sellers
Built with