coupang
POST/v2/providers/openapi/apis/api/v1/vendors/{vendorId}/orders/directIntegration/downloadInvoices2609170000

[For Taiwan Only]Download invoice for direct integrated courier

# 01

Summary

[For Taiwan Only]Download invoice for direct integrated courier

# 02

Details

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

https://api-gateway.coupang.com/v2/providers/openapi/apis/api/v1/vendors/A158000ABC/orders/directIntegration/downloadInvoices

Request Parameters

Path Segment Parameter

Name Required Type Description
vendorId O String Vendor ID Unique code Coupang issues to vendorse.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_KERRYInvoice file is pdfcontent-type = application/pdf;charset=UTF-8
  • TWL_HCTInvoice file is pdfcontent-type = application/pdf;charset=UTF-8
  • TWL_FMInvoice file is html content-type = text/html;charset=UTF-8
  • TWL_711Invoice 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

...

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

......

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

Path

POST/v2/providers/openapi/apis/api/v1/vendors/{vendorId}/orders/directIntegration/downloadInvoices

Example endpoint

https://api-gateway.coupang.com/v2/providers/openapi/apis/api/v1/vendors/{vendorId}/orders/directIntegration/downloadInvoices
# 03

Path parameters

NameTypeDescription
vendorId*string
Vendor ID
Unique code Coupang issues to vendors
e.g. A158000ABC
# 04

Request body

Request parameters

Body parameter

NameTypeDescription
deliveryCompanyCode*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*object[]
List of invoicePrintDto. Maximum size of invoicePrintDtoList.
  • TWL_KERRY : 5
  • TWL_HCT : 5
  • TWL_FM : 30
  • TWL_711: 40
shipmentBoxId*
invoicePrintDtoList[].shipmentBoxId
number
Shipment No. (bundled shipment No.)
invoiceNumber*
invoicePrintDtoList[].invoiceNumber
string
Invoice No from courier
# 05

Response body

# 06

Error codes

HTTPCodeMessage
400HTTP_400Bad Request

Error specification

HTTPTypeError messageSolution
400400

Invalid vendor ID

vendorId in path or header (X-Requested-By) is invalid or doesn’t equal, pls check and keep the same vendorId.

400400

Unsupported deliveryCompanyCode

deliveryCompanyCode is not supported. Supported couriers are TWL_KERRY, TWL_FM, TWL_711, TWL_HCT

400400

Empty deliveryCompanyCode, please input deliveryCompanyCode

Input deliveryCompanyCode. Supported couriers are TWL_KERRY, TWL_FM, TWL_711, TWL_HCT

400400

Empty invoicePrintDtoList, please input invoicePrintDtoList

Input invoicePrintDtoList.

400400

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