HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Update Order Invoice

Function

To update order invoice's status
更新訂單發票狀態

URL

PUT <<api_domain>>/v1/orders/:id/invoices/:invoice_number

Request Parameters

curl --location -g --request PUT 'api_domain/v1/orders/:id/invoices/:invoice_number' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
 "invoice_status": "cancel"
}'
ParameterTypeDescriptionExample
id
*Required
StringOrder's ID
訂單ID
"59e97965e388095314000010"
invoice_number
*Required
StringInvoice's number
發票號碼
Can only input 1 invoice number at once
一次只能輸入一筆發票號碼
"AZ12345678"
invoice_statusStringInvoice's status
發票狀態
-
Status allows:
cancel 已作廢
"cancel"

Response Field

FieldTypeDescriptionExample
idStringInvocie ID
發票ID
"59e97965e388095314000010"
invoice_statusStringInvoice status
發票狀態
"active"
invoice_tax_typeStringInvoice Type
發票種類
-
0: 電子發票
1: 捐贈發票
2: 公司戶紙本發票
3: 二聯式發票
"1"
invoice_numberStringInvoice's number
發票號碼
"FT07050346"
invoice_dateDateTimeInvoice Date
發票日期
"2021-07-08"
updated_atDateTimeUpdated Time
更新時間
"2021-07-16T09:49:54.615Z"
created_atDateTimeCreated Time
創建時間
"2021-07-16T09:49:54.615Z"

Response Example

{
  "id": "string",
  "invoice_status": "active",
  "invoice_tax_type": "1",
  "invoice_number": "FT07050346",
  "invoice_date": "2021-07-08",
  "updated_at": "2021-07-16T09:49:54.615Z",
  "created_at": "2021-07-16T09:49:54.615Z"
}