発注対象商品取得
GET
/purchase_orders/{purchase_order_id}/products
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/purchase_orders/6/products?fields=storageInfoProductId%2CproductId&sort=storageInfoProductId&limit=10&page=2&product_id=8000001&with_deliveries=all';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/purchase_orders/6/products?fields=storageInfoProductId%2CproductId&sort=storageInfoProductId&limit=10&page=2&product_id=8000001&with_deliveries=all'発注対象商品情報を取得します。
対象プラン
- リテールビジネス
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”purchase_order_id
required
string
発注ID
Example
6Query Parameters
Section titled “Query Parameters”fields
array
検索パラメータ(カンマ区切りで指定可)
Response項目を指定可能
※一部項目(withで指定する項目、2階層目以降の項目)については指定不可
Example
storageInfoProductId,productIdsort
string
並び順(カンマ区切りで指定可)
指定可能なパラメータ
- storageInfoProductId:発注商品ID
- productId:商品ID
- quantity:発注数量
- updDateTime:更新日時:登録時・更新時の日時。[YYYY-MM-DDThh:mm:ssTZD]
Example
storageInfoProductIdlimit
integer
上限数
Example
10page
integer
ページ
Example
2product_id
string
商品ID
Example
8000001with_deliveries
string
配送先店舗付加フラグ:(none:付加しない、all:付加する)
Example
allResponses
Section titled “Responses”取得成功
Media typeapplication/json
Array<object>
object
storageInfoProductId
発注商品ID
string
storageInfoId
発注ID
string
productId
商品ID
string
taxRate
税率
string
cost
原価(外税)
string
taxDivision
税区分:(0:税込、1:税抜、2:非課税)
string
quantity
発注数量
string
insDateTime
作成日時:登録時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string
updDateTime
更新日時:登録時・更新時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string
deliveryStore
発注配送商品
Array<object>
object
storageInfoDeliveryProductId
発注配送商品ID
string
storeId
配送店舗ID
string
quantity
発注数量
string
Example
[ { "storageInfoProductId": "6", "storageInfoId": "6", "productId": "8000001", "taxRate": "10.000", "cost": "100.00000", "taxDivision": "0", "quantity": "5", "insDateTime": "2025-01-01T00:00:00+09:00", "updDateTime": "2025-01-01T00:00:00+09:00", "deliveryStore": [ { "storageInfoDeliveryProductId": "6", "storeId": "1", "quantity": "5" } ] }]指定した発注データが存在しない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
Example指定した発注データが存在しない場合
{ "type": "about:blank", "title": "NotFound", "detail": "指定されたIDのリソースが見つかりません", "status": 404}