顧客注文
顧客注文エンドポイントでは、外部ストアから設定済みの明細を読み取り、数量を更新し、注文の履行ステータスを進め、放棄された注文を削除できます。
| パラメータ | 必須 | 詳細 |
|---|---|---|
name | いいえ | デザイン名と数値の注文 ID を検索します。 |
category_id | いいえ | 商品カテゴリ ID で絞り込みます。 |
order_status | いいえ | 指定可能な注文ステータスのいずれか。 |
offset | いいえ | デフォルトは 0。>= 0 である必要があります。 |
limit | いいえ | このコントローラーのデフォルトは 9、最大は 50 です。 |
order_by | いいえ | id、created_at、design_name のいずれか。 |
direction | いいえ | ASC または DESC。 |
リクエスト例(fetch)
const params = new URLSearchParams({
limit: '20',
offset: '0',
order_status: 'shopping_cart',
order_by: 'created_at',
direction: 'DESC'
});
const orders = await alterFetch(`/customer-orders?${params.toString()}`);
const order = await alterFetch('/customer-orders/123');
const batch = await alterFetch('/customer-orders/batch', {
method: 'POST',
body: JSON.stringify({
customerOrderIds: [123, 124, 125]
})
});指定可能な値
| ステータス | 説明 |
|---|---|
shopping_cart | カートの処理中です。顧客は引き続き設定を編集できます。 |
editable | 顧客は引き続き注文を編集できます。 |
paid | 注文は支払い済みで、履行を開始できる状態です。 |
processing | 注文の履行処理中です。 |
completed | 注文の履行が完了しています。 |
cancelled | 注文はキャンセルされました。 |
リクエスト例(fetch)
await alterFetch('/customer-orders/123/status', {
method: 'PATCH',
body: JSON.stringify({
status: 'processing'
})
});
await alterFetch('/customer-orders/123/quantity', {
method: 'PATCH',
body: JSON.stringify({
items: [
{ orderDetailId: 987, quantity: 3 }
]
})
});
await alterFetch('/customer-orders/123/quantity/all', {
method: 'PATCH',
body: JSON.stringify({
quantity: 2
})
});
await alterFetch('/customer-orders/123', {
method: 'DELETE'
});レスポンス例
{
"order": {
"id": 123,
"customizerId": 381,
"orderStatus": "shopping_cart",
"createdAt": "2026-05-28T10:15:00.000Z",
"customizerOrderURL": "https://alterproduct.com/app/customizer/381/123",
"productItems": [
{
"id": 987,
"model3d": { "id": 381 },
"size": {
"id": 395,
"name": { "pl": "M", "en": "M" },
"measureSize": null
},
"material": {
"id": 2,
"name": { "pl": "Bawełna", "en": "Cotton" }
},
"printType": {
"id": 1,
"name": { "pl": "DTG", "en": "DTG" }
},
"color": {
"id": 418,
"name": { "pl": "Domyślny", "en": "Default" },
"hex": "#ffffff"
},
"variant": {
"id": 531,
"metadata": null,
"stockQuantity": 25
},
"unitPrice": { "value": 12.5, "currency": "EUR" },
"totalPrice": { "value": 37.5, "currency": "EUR" },
"quantity": 3
}
],
"customizerName": "Men's T-Shirt",
"productGroup": {
"id": 4,
"name": { "pl": "Koszulka", "en": "T-Shirt" }
},
"totalPrice": { "value": 37.5, "currency": "EUR" }
}
}