---
title: "Request Order Invoice Creation"
method: POST
path: "/orders/{orderId}/request_invoice_creation"
tags: ["Orders"]
---

# Request Order Invoice Creation

`POST /orders/{orderId}/request_invoice_creation`

## Request

- Base URL: `https://open.shopline.io/v1`
- URL: `https://open.shopline.io/v1/orders/{orderId}/request_invoice_creation`
- Auth: HTTP bearer

Triggers SHOPLINE to create an invoice for an order through the merchant's configured invoice provider. An optional runtime-only invoice remark can be included.<br> 透過商家設定的發票服務商觸發 SHOPLINE 為訂單開立發票，並可選填僅供本次開票使用的發票備註。

## Path parameters

- `orderId` string, required

## Request body

- object
  - `invoice_remark` string, nullable: Optional invoice remark used only during invoice creation. Only Chinese characters, English letters, digits, and spaces are accepted.<br> 僅於本次開票使用的選填備註，只接受中英數和空白。

## Response `200`

Invoice created

- RequestInvoiceCreationResponse
  - `data` Invoice, required
    - `id` string: Invocie ID<br>發票ID
    - `invoice_status` 'active' | 'cancel': Invoice status<br>發票狀態<br>-<br> active 已開立<br> cancel 已作廢
    - `invoice_tax_type` string
    - `invoice_number` string
    - `invoice_date` string
    - `updated_at` string
    - `created_at` string
    - `cancelled_at` string
  - `error` object, nullable, required
  - `trace_id` string, required

## Other responses

- `404`: Order not found
- `409`: Invoice already exists for this order
- `422`: Validation or invoice provider error
- `423`: Another request is creating an invoice for this order
- `429`: Invoice provider rate limited the request. Unmapped provider messages are returned as an empty client message.
- `500`: Server error
- `503`: Invoice provider is temporarily unavailable. Unmapped provider messages are returned as an empty client message.

## Changes

- **2026-11-03** `d2518391b149`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/shoplineapp/apis/shopline-open-api/changes/orders/:orderId/request_invoice_creation/post.md)

---

[API](https://skmtc.dev/shoplineapp/apis/shopline-open-api.md) - [All operations](https://skmtc.dev/shoplineapp/apis/shopline-open-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shoplineapp/apis/shopline-open-api/revisions/d2518391b149?raw)
