PUT Sale
Developing
PUT
{{url}}api/v1/admin/sales/{id}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request PUT 'http://ecompulse.test/api/v1/admin/sales/7' \
--header 'Accept: application/json' \
--header 'X-API-Key: exzbLclGAzBCyL0k1Yv29Evu6mwoYOATBF0lWPyT' \
--header 'Content-Type: application/json' \
--data-raw '{
"reference_no": "INV-00010",
"warehouse_id": 1,
"customer_id": 3,
"date": "2024-05-07",
"note": "new sale edit",
"biller_id": 3,
"status": 1,
"products": [
{
"id": 10,
"price": 119.00,
"product_net_price": 119.00,
"qty": 2,
"discount": 0.00,
"weight_based_price": 0.00,
"product_price_tax": 0.00,
"subtotal": 238.00
},
{
"id": 15,
"price": 235.00,
"product_net_price": 215.00,
"qty": 1,
"discount": 20.00,
"weight_based_price": 0.00,
"product_price_tax": 12.90,
"subtotal": 227.90,
"option_id": 2,
"option_values": [
{
"label": "White",
"qty": 1
}
]
}
],
"order_tax": 27.95,
"order_shipping": 10.00,
"order_discount": 20.00,
"grand_total": 482.65,
"payment": {
"amount": 482.65,
"paying_by": 1
}
}'
Response Response Example
{
"status": "success",
"message": "Purchase updated successfully",
"data": {
"id": 7,
"reference_no": "INV-00010",
"date": "2024-05-07 00:00:00",
"note": "new sale edit",
"order_tax": "27.95",
"order_shipping": "10.00",
"order_discount": "20.00",
"grand_total": "482.65",
"paid": "482.65",
"balance": "0.00",
"customer_payment": {
"paid": "482.65",
"change": "0.00",
"paying_by": "Card"
},
"paid_status": {
"value": 1,
"text": "Paid"
},
"warehouse": {
"id": 1,
"name": "Warehouse 1"
},
"customer": {
"id": 3,
"name": "Tom"
},
"biller": {
"id": 3,
"name": "William"
},
"sale_by": "Sale Order",
"status": {
"value": 1,
"text": "Completed"
},
"products": [
{
"id": 10,
"sku": "P10",
"name": "Girl Summer bracelets",
"total_qty": 28,
"qty": 2,
"price": "119.00",
"product_net_price": "119.00",
"discount": "0.00",
"weight_based_price": "0.00",
"product_price_tax": "0.00",
"subtotal": "238.00",
"tax_method_id": null,
"tax_id": null,
"option_id": null,
"option_values": null
},
{
"id": 15,
"sku": "SKU 15",
"name": "iPhone 6S",
"total_qty": 34,
"qty": 1,
"price": "235.00",
"product_net_price": "215.00",
"discount": "20.00",
"weight_based_price": "0.00",
"product_price_tax": "12.90",
"subtotal": "227.90",
"tax_method_id": 2,
"tax_id": 3,
"option_id": 2,
"option_values": [
{
"label": "White",
"qty": 1
}
]
}
],
"payments": [
{
"id": 10,
"paid_date": "2024-05-07 00:00:00",
"amount": "482.65",
"note": null,
"paying_by": {
"value": 1,
"text": "Card"
}
}
]
}
}
Request
Path Params
id
integerÂ
required
Example:
7
Header Params
Accept
stringÂ
required
Example:
application/json
X-API-Key
stringÂ
required
Example:
{{key}}
Body Params application/json
Responses
Modified at 2024-05-27 00:53:21