Purchase
Separate purchase
Separate a purchase into multiple purchases
post/shops/{SHOP_ID}/purchases/separate
Path parameters
SHOP_IDinteger required
Example:4
Shop ID
Request body
Example request
{
"newPurchase": {
"auto_create_debts": true,
"discount": 500,
"images": [
"https://statics.pancake.vn/user-content-dev2.pancake.vn/2021/12/27/18c4500c320cb2e993b3ff4b3be81165df64d3ba.png"
],
"items": [
{
"imported_price": 100000,
"quantity": 1,
"variation_id": "ddefd476-bc91-4151-8cd2-2cf5ad227f09",
"index": 0
}
],
"not_create_transaction": false,
"note": "Tách phiếu nhập",
"prepaid_debt": 20000,
"received_at": 1683997200,
"status": 0,
"supplier_products_id": 293,
"tags": [
1
],
"transport_fee": 0,
"warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da"
},
"oldPurchase": {
"auto_create_debts": true,
"discount": 500,
"id": "0ecbdb3b-a376-4a3d-9b8a-174ae15ae886",
"images": [
"https://statics.pancake.vn/user-content-dev2.pancake.vn/2021/12/27/18c4500c320cb2e993b3ff4b3be81165df64d3ba.png"
],
"items": [
{
"imported_price": 100000,
"quantity": 23,
"variation_id": "ddefd476-bc91-4151-8cd2-2cf5ad227f09",
"index": 0
}
],
"not_create_transaction": false,
"note": "Nhập hàng để bán",
"prepaid_debt": 20000,
"received_at": 1683997200,
"status": 0,
"supplier_products_id": 293,
"tags": [
1
],
"transport_fee": 0,
"warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da"
}
}Response
Success
Changes
No recorded changes to this endpoint across all 1 revision of this API.