Available buyer market: Taiwan
Download invoice for direct integrated courier. Order information you want to download as invoices must be available on direct integrated courier. Order information is transferred to courier by arrange shipment.
Note: This API doesn't respond with invoice data if the order status is ACCEPT, or FINAL_DELIVERY status over 7 days.
Supported direct integrated couriers
| Company Name | Type | deliveryCompanyCode |
| HomeDelivery-Kerry | Home delivery | TWL_KERRY |
| HomeDelivery-Hsin Chu | Home delivery | TWL_HCT |
| CVS-Familymart | CVS | TWL_FM |
| CVS-7-11 | CVS | TWL_711 |
Path
POST
/v2/providers/openapi/apis/api/v1/vendors/{vendorId}/orders/directIntegration/downloadInvoices
Request Example
Request Parameters
Path Segment Parameter
| Name | Required | Type | Description |
| vendorId | O | String | Vendor ID Unique code Coupang issues to vendors e.g. A158000ABC |
Request Body Parameter
| Name | Required | Type | Description | |
| deliveryCompanyCode | O | String | Courier code Please input the right courier code otherwise the request would fail. - Home delivery: TWL_KERRY, TWL_HCT - CVS : TWL_FM, TWL_711 |
|
| invoicePrintDtoList | O | Array | List of invoicePrintDto. Maximum size of invoicePrintDtoList. - TWL_KERRY : 5 - TWL_HCT : 5 - TWL_FM : 30 - TWL_711: 40 |
|
| shipmentBoxId | O | Number | Shipment No. (bundled shipment No.) | |
| invoiceNumber | O | String | Invoice No from courier | |
Request Example
Home delivery request:
{
"deliveryCompanyCode": "TWL_KERRY",
"invoicePrintDtoList": [
{
"shipmentBoxId": 595428823171074,
"invoiceNumber": "17736737875"
},
{
"shipmentBoxId": 595428823171073,
"invoiceNumber": "17736737871"
}
]
}
CVS request:
{
"deliveryCompanyCode": "TWL_FM",
"invoicePrintDtoList": [
{
"shipmentBoxId": 595462662815744,
"invoiceNumber": "15314703241"
},
{
"shipmentBoxId": 595481864355841,
"invoiceNumber": "23415470849"
}
]
}
Response Message
Response is a file. Content-type is different per courier.
- TWL_KERRY
Invoice file is pdf
content-type = application/pdf;charset=UTF-8 - TWL_HCT
Invoice file is pdf
content-type = application/pdf;charset=UTF-8 - TWL_FM
Invoice file is html
content-type = text/html;charset=UTF-8 - TWL_711
Invoice file is html
content-type = text/html;charset=UTF-8
Response Example
TWL_KERRY :
HTTP/1.1 200 OK
content-type: application/pdf;charset=UTF-8
content-length: 183409
content-disposition: attachment; filename="7e1beb74-11e9-407c-9775-04696ea3db2f.pdf"
accept-ranges: bytes
TWL_FM :
HTTP/1.1 200 OK
content-type: text/html;charset=UTF-8
vary: Accept-Encoding
content-disposition: attachment; filename="e4d3dfd5-c027-4fc8-9004-054e4fe76805.html"
content-encoding: gzip
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
...
</html>
TWL_711 :
HTTP/1.1 200 OK
content-type: text/html;charset=UTF-8
vary: Accept-Encoding
content-disposition: attachment; filename="dbd98df5-f377-4f5b-bb6e-9a643782fd8a.html"
content-encoding: gzip
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
......
</html>
Error Spec
| HTTP Status Code (Error Type) | Error Message | Solution |
| 400 | Invalid vendor ID | vendorId in path or header (X-Requested-By) is invalid or doesn’t equal, pls check and keep the same vendorId. |
| 400 | Unsupported deliveryCompanyCode | deliveryCompanyCode is not supported. Supported couriers are TWL_KERRY, TWL_FM, TWL_711, TWL_HCT |
| 400 | Empty deliveryCompanyCode, please input deliveryCompanyCode | Input deliveryCompanyCode. Supported couriers are TWL_KERRY, TWL_FM, TWL_711, TWL_HCT |
| 400 | Empty invoicePrintDtoList, please input invoicePrintDtoList | Input invoicePrintDtoList. |
| 400 | Request size exceeds maximum limit of 5. requestSize: 6 | Check maximum allowed size of InvoicePrintDtoList. - TWL_KERRY : 5 - TWL_HCT : 5 - TWL_FM : 30 - TWL_711: 40 |
URL API Name
DOWNLOAD_INVOICE