Browse Documentation
PUT Update pos sale

Update POS Sale

PUT /pos/:id

Update an existing POS Sale. Only POS Sales in draft status can be updated.

You only need to supply the items that need to be updated. Properties not part of the update request will be left unchanged. if you want to remove certain properties you need to explicitly set them to null.

When you include the items property you need to add the all the items including their ids. Items not listed will be deleted from the POS sale object.

Request

{
    "possale": {
    "template_id": "2bb146d1ea56cab3a80561d8b563e6a78eeef437",
    "items": [
        {
        "id": "51dfd393058c591f626682f0278dcf1d8bb619a8",
        "title": "T-Shirt",
        "description": "Size: M",
        "quantity": 1,
        "price": 100
        },
        {
        "id": "0bdd92128318b7e214fcb14564e68e11f43541c9",
        "title": "Trousers",
        "quantity": 3,
        "price": 30
         },
        {
        "title": "Shipping",
        "quantity": 1,
        "price": 10
        }
    ]
    }
}


Response

{
"id": "74f5276cc8fecfd46795a69ac4279dac7a6e8a06",
"organization_id": "7331ecfc6eb6050a5f0c3c0e12b3b6e95cdf9ed5",
"document_number": "_",
"client_id": null,
"total_amount": 200,
"total_base_amount": 200,
"total_tax_amount": 0,
"amount_due": 0,
"currency": "NGN",
"date_issued": "2018-01-21",
"date_due": "2018-03-04",
"date_created": "2018-02-04",
"date_updated": "2018-02-04",
"status": "draft",
"template_id": "2bb146d1ea56cab3a80561d8b563e6a78eeef437",
"user": {
    "email": "[email protected]",
    "name":"Test" 
}
"reference": null,
"items": [
{
"id": "51dfd393058c591f626682f0278dcf1d8bb619a8",
"title": "T-Shirt",
"description": "Size: M",
"quantity": 1,
"item_base_amount": 100,
"tax_id": "95b709aefb0e92d433c832f0b3bf4edc0b9ce8e9",
"tax_name": "Exempt",
"tax_percentage": 0,
"line_base_amount": 100,
"line_tax_amount": 0,
"line_total_amount": 100,
"tax_included": true,
"price": 100,
"gl_account": {
"id": "65baa5799055121db323f4ee6bf0a709516a6d96",
"code": "700000",
"title": "Verkopen",
"description": null
}
},
{
"id": "0bdd92128318b7e214fcb14564e68e11f43541c9",
"title": "Trousers",
"description": null,
"quantity": 3,
"item_base_amount": 30,
"tax_id": "95b709aefb0e92d433c832f0b3bf4edc0b9ce8e9",
"tax_name": "Exempt",
"tax_percentage": 0,
"line_base_amount": 90,
"line_tax_amount": 0,
"line_total_amount": 90,
"tax_included": true,
"price": 30,
"gl_account": {
"id": "65baa5799055121db323f4ee6bf0a709516a6d96",
"code": "700000",
"title": "Verkopen",
"description": null
}
},
{
"id": "e8ccf252972d2c1277ba0dc1b6f4565f8b2be9f0",
"title": "Shipping",
"description": null,
"quantity": 1,
"item_base_amount": 10,
"tax_id": "95b709aefb0e92d433c832f0b3bf4edc0b9ce8e9",
"tax_name": "Exempt",
"tax_percentage": 0,
"line_base_amount": 10,
"line_tax_amount": 0,
"line_total_amount": 10,
"tax_included": true,
"price": 10,
"gl_account": {
"id": "65baa5799055121db323f4ee6bf0a709516a6d96",
"code": "700000",
"title": "Verkopen",
"description": null
}
}
],
"clearings": []
}