- Auth Request
- Document Management
- Validate Documents
- Delivery Service
- Create Document JSONPOST
- List SellersGET
- Create Tax InvoicePOST
- Update Tax InvoicePUT
- Create Debit NotePOST
- Create Credit NotePOST
- Create InvoicePOST
- Create ReceiptPOST
- Create Invoice and Tax InvoicePOST
- Create Receipt and Tax InvoicePOST
- Create Delivery Order and Tax InvoicePOST
- Create Abbreviated Tax InvoicePOST
- Create Receipt Abbreviated Tax InvoicePOST
- Document Raw DataPOST
- Download DocumentPOST
- Download Document By IdGET
- Get Batch By IdGET
- List ProvincesGET
- List DistrictsGET
- List Sub DistrictsGET
- List PostsGET
Document Raw Data
POST
https://api.gofive.co.th/etaxgo/Documents
Documents
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:
<Your-Subscription-Key>
Authorization
string
required
Content-Type
string
required
Example:
application/x-www-form-urlencoded
Body Params application/json
rawData
object
required
DeliveryModels
array [object {3}]
required
pdfFile
string <byte> | null
optional
xmlFile
string <byte> | null
optional
Example
{
"rawData": {
"DeliveryModels": [
{
"deliveryInfo": {
"emailAddress1": "string",
"emailAddress2": "string",
"customEmailAddresses": [
"string"
],
"smsTelNo1": "string",
"customSMSTelNos": [
"string"
],
"password": "string",
"printDeiveryType": "string",
"eDeliveryType": true,
"isAlertbySMS": true,
"templateToken": "string",
"sendEmailDateTime": "string",
"sendSmsDateTime": "string"
},
"documents": [
{
"header": {
"exchangedDocument": {
"id": "string",
"name": "string",
"typeCode": "string",
"issueDateTime": "2024-10-21T00:00:00",
"purpose": "string",
"purposeCode": "string",
"creationDateTime": "2024-10-21T00:00:00",
"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",
"taxIdSchemeId": "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": "2024-10-21T00:00:00",
"referenceTypeCode": "string"
},
"applicableTradeTax": {
"currencyCode": "string",
"typeCode": "string",
"calculatedRate": 0,
"basisAmount": 0,
"calculatedAmount": 0
},
"specifiedTradeAllowance": {
"chargeIndicator": true,
"actualAmount": 0,
"reasonCode": "string",
"reason": "string"
},
"specifiedTradeCharge": {
"chargeIndicator": true,
"actualAmount": 0,
"reasonCode": "string",
"reason": "string"
},
"specifiedTradeSettlementHeaderMonetarySummation": {
"originalInformationAmount": 0,
"lineTotalAmount": 0,
"differenceSalesInformationAmount": 0,
"allowanceTotalAmount": 0,
"chargeTotalAmount": 0,
"taxBasisTotalAmount": 0,
"taxTotalAmount": 0,
"grandTotalAmount": 0
},
"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",
"custom31": "string",
"custom32": "string",
"custom33": "string",
"custom34": "string",
"custom35": "string",
"custom36": "string",
"custom37": "string",
"custom38": "string",
"custom39": "string",
"custom40": "string",
"custom41": "string",
"custom42": "string",
"custom43": "string",
"custom44": "string",
"custom45": "string",
"custom46": "string",
"custom47": "string",
"custom48": "string",
"custom49": "string",
"custom50": "string",
"custom51": "string",
"custom52": "string",
"custom53": "string",
"custom54": "string",
"custom55": "string",
"custom56": "string",
"custom57": "string",
"custom58": "string",
"custom59": "string",
"custom60": "string",
"custom61": "string",
"custom62": "string",
"custom63": "string",
"custom64": "string",
"custom65": "string",
"custom66": "string",
"custom67": "string",
"custom68": "string",
"custom69": "string",
"custom70": "string",
"custom71": "string",
"custom72": "string",
"custom73": "string",
"custom74": "string",
"custom75": "string",
"custom76": "string",
"custom77": "string",
"custom78": "string",
"custom79": "string",
"custom80": "string",
"custom81": "string",
"custom82": "string",
"custom83": "string",
"custom84": "string",
"custom85": "string",
"custom86": "string",
"custom87": "string",
"custom88": "string",
"custom89": "string",
"custom90": "string",
"custom91": "string",
"custom92": "string",
"custom93": "string",
"custom94": "string",
"custom95": "string",
"custom96": "string",
"custom97": "string",
"custom98": "string",
"custom99": "string",
"custom100": "string",
"custom101": "string",
"custom102": "string",
"custom103": "string",
"custom104": "string",
"custom105": "string",
"custom106": "string",
"custom107": "string",
"custom108": "string",
"custom109": "string",
"custom110": "string",
"custom111": "string",
"custom112": "string",
"custom113": "string",
"custom114": "string",
"custom115": "string",
"custom116": "string",
"custom117": "string",
"custom118": "string",
"custom119": "string",
"custom120": "string",
"custom121": "string",
"custom122": "string",
"custom123": "string",
"custom124": "string",
"custom125": "string",
"custom126": "string",
"custom127": "string",
"custom128": "string",
"custom129": "string",
"custom130": "string",
"custom131": "string",
"custom132": "string",
"custom133": "string",
"custom134": "string",
"custom135": "string",
"custom136": "string",
"custom137": "string",
"custom138": "string",
"custom139": "string",
"custom140": "string",
"custom141": "string",
"custom142": "string",
"custom143": "string",
"custom144": "string",
"custom145": "string",
"custom146": "string",
"custom147": "string",
"custom148": "string",
"custom149": "string",
"custom150": "string"
}
},
"details": [
{
"includedSupplyChainTradeLineItem": {
"lineId": "string",
"id": "string",
"name": "string",
"chargeAmount": 0,
"billedQuantity": 0,
"billedQuantityUnit": 0
},
"applicableTradeTax": {
"typeCode": "string",
"calculatedRate": 0,
"basisAmount": 0,
"calculatedAmount": 0
},
"specifiedTradeAllowance": {
"chargeIndicator": true,
"actualAmount": 0,
"reasonCode": "string",
"reason": "string"
},
"specifiedTradeSettlementMonetarySummation": {
"taxTotalAmount": 0,
"netLineTotalAmount": 0,
"netIncludingTaxesLineTotalAmount": 0
},
"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",
"custom31": "string",
"custom32": "string",
"custom33": "string",
"custom34": "string",
"custom35": "string",
"custom36": "string",
"custom37": "string",
"custom38": "string",
"custom39": "string",
"custom40": "string",
"custom41": "string",
"custom42": "string",
"custom43": "string",
"custom44": "string",
"custom45": "string",
"custom46": "string",
"custom47": "string",
"custom48": "string",
"custom49": "string",
"custom50": "string"
},
"subDetails": [
{
"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",
"custom31": "string",
"custom32": "string",
"custom33": "string",
"custom34": "string",
"custom35": "string",
"custom36": "string",
"custom37": "string",
"custom38": "string",
"custom39": "string",
"custom40": "string",
"custom41": "string",
"custom42": "string",
"custom43": "string",
"custom44": "string",
"custom45": "string",
"custom46": "string",
"custom47": "string",
"custom48": "string",
"custom49": "string",
"custom50": "string"
}
]
}
]
}
],
"eTaxNo": "string"
}
]
},
"pdfFile": "string",
"xmlFile": "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' \
--header 'Ocp-Apim-Subscription-Key: <Your-Subscription-Key>' \
--header 'Authorization;' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-raw '{
"rawData": {
"DeliveryModels": [
{
"deliveryInfo": {
"emailAddress1": "string",
"emailAddress2": "string",
"customEmailAddresses": [
"string"
],
"smsTelNo1": "string",
"customSMSTelNos": [
"string"
],
"password": "string",
"printDeiveryType": "string",
"eDeliveryType": true,
"isAlertbySMS": true,
"templateToken": "string",
"sendEmailDateTime": "string",
"sendSmsDateTime": "string"
},
"documents": [
{
"header": {
"exchangedDocument": {
"id": "string",
"name": "string",
"typeCode": "string",
"issueDateTime": "2024-10-21T00:00:00",
"purpose": "string",
"purposeCode": "string",
"creationDateTime": "2024-10-21T00:00:00",
"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",
"taxIdSchemeId": "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": "2024-10-21T00:00:00",
"referenceTypeCode": "string"
},
"applicableTradeTax": {
"currencyCode": "string",
"typeCode": "string",
"calculatedRate": 0,
"basisAmount": 0,
"calculatedAmount": 0
},
"specifiedTradeAllowance": {
"chargeIndicator": true,
"actualAmount": 0,
"reasonCode": "string",
"reason": "string"
},
"specifiedTradeCharge": {
"chargeIndicator": true,
"actualAmount": 0,
"reasonCode": "string",
"reason": "string"
},
"specifiedTradeSettlementHeaderMonetarySummation": {
"originalInformationAmount": 0,
"lineTotalAmount": 0,
"differenceSalesInformationAmount": 0,
"allowanceTotalAmount": 0,
"chargeTotalAmount": 0,
"taxBasisTotalAmount": 0,
"taxTotalAmount": 0,
"grandTotalAmount": 0
},
"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",
"custom31": "string",
"custom32": "string",
"custom33": "string",
"custom34": "string",
"custom35": "string",
"custom36": "string",
"custom37": "string",
"custom38": "string",
"custom39": "string",
"custom40": "string",
"custom41": "string",
"custom42": "string",
"custom43": "string",
"custom44": "string",
"custom45": "string",
"custom46": "string",
"custom47": "string",
"custom48": "string",
"custom49": "string",
"custom50": "string",
"custom51": "string",
"custom52": "string",
"custom53": "string",
"custom54": "string",
"custom55": "string",
"custom56": "string",
"custom57": "string",
"custom58": "string",
"custom59": "string",
"custom60": "string",
"custom61": "string",
"custom62": "string",
"custom63": "string",
"custom64": "string",
"custom65": "string",
"custom66": "string",
"custom67": "string",
"custom68": "string",
"custom69": "string",
"custom70": "string",
"custom71": "string",
"custom72": "string",
"custom73": "string",
"custom74": "string",
"custom75": "string",
"custom76": "string",
"custom77": "string",
"custom78": "string",
"custom79": "string",
"custom80": "string",
"custom81": "string",
"custom82": "string",
"custom83": "string",
"custom84": "string",
"custom85": "string",
"custom86": "string",
"custom87": "string",
"custom88": "string",
"custom89": "string",
"custom90": "string",
"custom91": "string",
"custom92": "string",
"custom93": "string",
"custom94": "string",
"custom95": "string",
"custom96": "string",
"custom97": "string",
"custom98": "string",
"custom99": "string",
"custom100": "string",
"custom101": "string",
"custom102": "string",
"custom103": "string",
"custom104": "string",
"custom105": "string",
"custom106": "string",
"custom107": "string",
"custom108": "string",
"custom109": "string",
"custom110": "string",
"custom111": "string",
"custom112": "string",
"custom113": "string",
"custom114": "string",
"custom115": "string",
"custom116": "string",
"custom117": "string",
"custom118": "string",
"custom119": "string",
"custom120": "string",
"custom121": "string",
"custom122": "string",
"custom123": "string",
"custom124": "string",
"custom125": "string",
"custom126": "string",
"custom127": "string",
"custom128": "string",
"custom129": "string",
"custom130": "string",
"custom131": "string",
"custom132": "string",
"custom133": "string",
"custom134": "string",
"custom135": "string",
"custom136": "string",
"custom137": "string",
"custom138": "string",
"custom139": "string",
"custom140": "string",
"custom141": "string",
"custom142": "string",
"custom143": "string",
"custom144": "string",
"custom145": "string",
"custom146": "string",
"custom147": "string",
"custom148": "string",
"custom149": "string",
"custom150": "string"
}
},
"details": [
{
"includedSupplyChainTradeLineItem": {
"lineId": "string",
"id": "string",
"name": "string",
"chargeAmount": 0,
"billedQuantity": 0,
"billedQuantityUnit": 0
},
"applicableTradeTax": {
"typeCode": "string",
"calculatedRate": 0,
"basisAmount": 0,
"calculatedAmount": 0
},
"specifiedTradeAllowance": {
"chargeIndicator": true,
"actualAmount": 0,
"reasonCode": "string",
"reason": "string"
},
"specifiedTradeSettlementMonetarySummation": {
"taxTotalAmount": 0,
"netLineTotalAmount": 0,
"netIncludingTaxesLineTotalAmount": 0
},
"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",
"custom31": "string",
"custom32": "string",
"custom33": "string",
"custom34": "string",
"custom35": "string",
"custom36": "string",
"custom37": "string",
"custom38": "string",
"custom39": "string",
"custom40": "string",
"custom41": "string",
"custom42": "string",
"custom43": "string",
"custom44": "string",
"custom45": "string",
"custom46": "string",
"custom47": "string",
"custom48": "string",
"custom49": "string",
"custom50": "string"
},
"subDetails": [
{
"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",
"custom31": "string",
"custom32": "string",
"custom33": "string",
"custom34": "string",
"custom35": "string",
"custom36": "string",
"custom37": "string",
"custom38": "string",
"custom39": "string",
"custom40": "string",
"custom41": "string",
"custom42": "string",
"custom43": "string",
"custom44": "string",
"custom45": "string",
"custom46": "string",
"custom47": "string",
"custom48": "string",
"custom49": "string",
"custom50": "string"
}
]
}
]
}
],
"eTaxNo": "string"
}
]
},
"pdfFile": "string",
"xmlFile": "string"
}'
Responses
🟢200OK
application/json
Body
validate
boolean
required
validateEmail
boolean
required
validateSms
boolean
required
errorMessage
string | null
required
warningMessage
string | null
required
batchId
string | null
required
pdf
string | null
required
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
}
🟠401Unauthorized
🟠403Forbidden
🟠401User authentication required V2.