Get Purchase Orders
Function
To get purchase orders
取得進貨單
URL
GET <<api_domain>>/v1/pos/purchase_orders
Request Parameters
Parameter | Type | Description | Example |
---|---|---|---|
query | String | Purchase order number or Custom ID | 20230321085431306 |
type | String | Purchase order Type (purchase or return) | purchase |
start_date | String | Date Range Start At | 2018-01-10T06:33:45.231+00:00 |
end_date | String | Date Range End At | 2018-01-10T06:33:45.231+00:00 |
statuses | Array | Purchase order status pending received completed cancelled | ['completed'] |
arrival_statuses | Array | Purchase order arrival status pending_to_receive partial all_received all_returned | ['all_received'] |
channel_id | String | Purchase order channel ID | 6049d431709478001d7c496b |
item_detail | Boolean | Is Show Item Detail Required default: false | true |
page | Integer | Page Number 頁數 (Default: 1) | 1 |
per_page | Integer | Numbers of Orders per Page 每頁顯示 n 筆資料 (Default: 24) | 20 |
Request Example
curl --location --request GET '<<api_domain>>/v1/pos/purchase_orders?item_detail=true' \
--header 'Authorization: Bearer ${token}'
Response Body
{
"pagination": {
"current_page": 1,
"per_page": 24,
"total_pages": 1,
"total_count": 1
},
"items": [
{
"created_at": "2023-03-21T08:10:06.774Z",
"updated_at": "2023-03-21T08:10:06.774Z",
"type": "purchase",
"number": "20230321081006571",
"custom_number": "",
"status": "pending",
"arrival_status": "pending_to_receive",
"scheduled_time": null,
"actual_time": null,
"other_fee": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"total_amount": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"current_amount": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"total_quantity": 1,
"current_quantity": 0,
"note": "",
"child_id": null,
"group_id": null,
"wapos_id": null,
"id": "6419665ee39bf300377cc5a4",
"issuer": null,
"executor": null,
"channel": null,
"items": [
{
"product_id": "6404a28b9843a60036e3e802",
"variation_id": "",
"product_name": {
"zh-hant": "png"
},
"variation_titles": null,
"variation_name": null,
"image_url": "https://img-shoplineapp-com.s3.amazonaws.com/media/image_clips/64058ac09843a60039e3e803/original.png?1678084797",
"sku": "fku6900",
"gtin": "54522008",
"total_quantity": 1,
"current_quantity": 0,
"purchase_price": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"supplier_id": null,
"subtotal": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"price": {
"cents": 100,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$100",
"dollars": 100.0
},
"product_removed": false,
"id": "6419665ee39bf300377cc5a3",
"same_price": null,
"supplier_name": null
}
],
"has_removed_items": false
}
],
"removed_item_ids": []
}
Updated about 1 month ago