Returns collection Cash Sale in JSON format. Company ID must be provided as URL param.
/api/inventorycashsale/list?companyId={companyId} or /api/inventorycashsale/list?retailShopId={retailShopId} or /api/inventorycashsale/list?salesPersonId={salesPersonId} or /api/inventorycashsale/list?companyId={companyId}&start={start}&limit={limit}
PROPERTY | DESCRIPTION |
---|---|
Method | GET |
Response formats | JSON |
Requires authentication? | Yes |
Always specify companyId
param
PARAM | TYPE | REQUIRED/OPTIONAL | DESCRIPTION |
---|---|---|---|
companyId |
number | required | The ID of the company for which to return Cash Sale. |
start |
number | optional | Specify beginning of paging |
limit |
number | optional | Specify end of paging |
Response
{ "count": 3, "list": [ { "issueDate": 1677013200000, "issuedTo": "Walk In Customer", "issuedToPhone": "-", "amountPaid": 10500.00, "paymentMethod": "CASH", "refNo": "Cash", "companyId": 11325677, "totalDiscount": 0.00, "cashbookId": 11328731, "totalTax": 0.00, "subTotal": 10500.00, "totalAmount": 10500.00, "notes": "Item/Product Sale to Walk in Customer -02/22/2023 15:30:53", "transactionType": "CASH", "userId": 11397123, "receiptNo": "RCPT-99", "retailShopId": 11332977, "balance": 0.00, "id": 11403631 }, { "issueDate": 1677013200000, "issuedTo": "Walk In Customer", "issuedToPhone": "-", "amountPaid": 11000.00, "paymentMethod": "CASH", "refNo": "Cash", "companyId": 11325677, "totalDiscount": 0.00, "cashbookId": 11328731, "totalTax": 0.00, "subTotal": 11000.00, "totalAmount": 11000.00, "notes": "Item/Product Sale to Walk in Customer -02/22/2023 15:30:53", "transactionType": "CASH", "userId": 11397123, "receiptNo": "RCPT-99", "retailShopId": 11332977, "balance": 0.00, "id": 11403632 }, { "itemName": "HPZ-32GB-1TB - HP ZBOOK FIREFLY 14 INCH G9 MOBILE WORKSTATION PC", "itemProductId": 12576778, "itemProductCatId": 12574245, "buyingPrice": 240000.00, "originalBuyingPrice": 200000.000, "discount": 0.00, "taxAmount": 0.00, "taxRate": 0.00, "unitCost": 240000.00, "qty": 1.0, "lineTotal": 240000.00, "taxIncExc": "0", "taxRateId": 0, "batchItemIssueId": 13365422, "invItemSpecsId": 12579310, "retailShopId": 12578873, "companyId": 6289269, "issuedTo": "Walk In Customer", "issuedToPhone": "12354", "issueDate": 1682456400000, "refNo": "CASH", "userId": 6292369, "profit": 0.0, "defaultBuyingPrice": 240000.00, "id": 13365622 } ] }
Returns collection Cash Sale in JSON format. Company ID must be provided as URL param.
/api/inventorycashsale/list_sale_items?companyId={companyId} or /api/inventorycashsale/list_sale_items?retailShopId={retailShopId} or /api/inventorycashsale/list_sale_items?salesPersonId={salesPersonId} or /api/inventorycashsale/list_sale_items?itemId={itemId} or /api/inventorycashsale/list_sale_items?itemCategoryId={itemCategoryId} or /api/inventorycashsale/list_sale_items?companyId={companyId}&start={start}&limit={limit}
PROPERTY | DESCRIPTION |
---|---|
Method | GET |
Response formats | JSON |
Requires authentication? | Yes |
Always specify companyId
param
PARAM | TYPE | REQUIRED/OPTIONAL | DESCRIPTION |
---|---|---|---|
companyId |
number | required | The ID of the company for which to return Cash Sale. |
start |
number | optional | Specify beginning of paging |
limit |
number | optional | Specify end of paging |
Response
{ "count": 2, "list": [ { "itemName": "PMS - PMS", "itemProductId": 12782653, "itemProductCatId": 12781751, "buyingPrice": 178.20, "originalBuyingPrice": 162.000, "discount": 0.00, "taxAmount": 0.00, "taxRate": 0.00, "unitCost": 178.20, "qty": 1.0, "lineTotal": 178.20, "taxIncExc": "0", "taxRateId": 0, "batchItemIssueId": 13365419, "retailShopId": 12578873, "companyId": 6289269, "issuedTo": "Walk In Customer", "issuedToPhone": "-", "issueDate": 1682456400000, "refNo": "CASH", "userId": 6292369, "profit": 0.0, "defaultBuyingPrice": 178.20, "id": 13365619 }, { "itemName": "PB-GLS - PIT BULL GLASSES", "itemProductId": 12782649, "itemProductCatId": 12781748, "buyingPrice": 3900.00, "originalBuyingPrice": 3000.000, "discount": 0.00, "taxAmount": 0.00, "taxRate": 0.00, "unitCost": 3900.00, "qty": 1.0, "lineTotal": 3900.00, "taxIncExc": "0", "taxRateId": 0, "batchItemIssueId": 13365420, "retailShopId": 12578873, "companyId": 6289269, "issuedTo": "124", "issuedToPhone": "124", "issueDate": 1682456400000, "refNo": "CASH", "userId": 6292369, "profit": 0.0, "defaultBuyingPrice": 3900.00, "id": 13365620 } ] }
Returns collection Cash Sale Items in JSON format. Company ID must be provided as URL param.
/api/itemcatalogspecs/list_for_receipt?companyId={companyId} or /api/itemcatalogspecs/list_for_receipt?companyId={companyId}&start={start}&limit={limit}
PROPERTY | DESCRIPTION |
---|---|
Method | GET |
Response formats | JSON |
Requires authentication? | Yes |
Always specify companyId
param
PARAM | TYPE | REQUIRED/OPTIONAL | DESCRIPTION |
---|---|---|---|
companyId |
number | required | The ID of the company for which to return item catalog specifics. |
Response
{ "count": 3, "list": [ { "limitRegionByIds": null, "limitPropertyByIds": null, "rowId": 0, "id": 11331387, "itemCategory": "Infinix Phones", "itemName": "Infinix SMART6 4G(2+32GB)", "itemCode": "X6511B(2+32GB)", "serialNo": "09705372CI003983", "imei1": "350347578747405", "imei2": "350347578747413", "color": "BLACK", "colorVariant": "POLAR BLACK", "itemSpecId": 11461518, "purchasePrice": 10200.000, "salePrice": 11500.00, "qty": 1, "warehouseId": 11333077, "warehouse": "EASTLEIGH", "shopId": 11332977, "shop": "EASTLEIGH", "companyId": null }, { "limitRegionByIds": null, "limitPropertyByIds": null, "rowId": 1, "id": 11331387, "itemCategory": "Infinix Phones", "itemName": "Infinix SMART6 4G(2+32GB)", "itemCode": "X6511B(2+32GB)", "serialNo": "09705372CI007479", "imei1": "350347578747629", "imei2": "350347578747637", "color": "BLACK", "colorVariant": "POLAR BLACK", "itemSpecId": 11461519, "purchasePrice": 10200.000, "salePrice": 11500.00, "qty": 1, "warehouseId": 11333077, "warehouse": "EASTLEIGH", "shopId": 11332977, "shop": "EASTLEIGH", "companyId": null }, { "limitRegionByIds": null, "limitPropertyByIds": null, "rowId": 2, "id": 11331387, "itemCategory": "Infinix Phones", "itemName": "Infinix SMART6 4G(2+32GB)", "itemCode": "X6511B(2+32GB)", "serialNo": "09705372CI012343", "imei1": "350347578747488", "imei2": "350347578747496", "color": "BLACK", "colorVariant": "POLAR BLACK", "itemSpecId": 11461520, "purchasePrice": 10200.000, "salePrice": 11500.00, "qty": 1, "warehouseId": 11333077, "warehouse": "EASTLEIGH", "shopId": 11332977, "shop": "EASTLEIGH", "companyId": null } ] }
Saves Cash Sale, either when creating new Cash Sale or updating a record.
/api/inventorycashsale/save
PROPERTY | DESCRIPTION |
---|---|
Method | POST |
Request representations | application/json |
Requires authentication? | Yes |
{ "id": number [required, updating], "issueDate": date [optional] [format: YYYY-MM-dd], "issuedTo": text [required, customer name], "issuedToPhone": text [required, customer phone name], "amountPaid": number [required, amount paid], "paymentMethod": enum [required, ['CASH','MPESA'],['CHECK']], "transactionType": enum [required, ['CASH','MPESA'],['CHECK']], "refNo": text [required, Ref No], "notes": text [required, narration], "cashbookId": number [required, ledger account id], "totalTax": number [required], "subTotal": number [required], "totalAmount": number [required], "userId": number [required], "retailShopId": number [required] "companyId": number [required] }
HTTP Status Code | Reason |
---|---|
200 |
Successfully saved |
405 |
Invalid input |
500 |
Internal server error |
Payload
{ "issueDate": "2016-08-03", "issuedTo": "Walk In Customer", "issuedToPhone": "-", "amountPaid": 10500.00, "refNo": "Cash", "companyId": 11325677, "totalDiscount": 0.00, "totalTax": 0.00, "subTotal": 10500.00, "totalAmount": 10500.00, "notes": "Item/Product Sale to Walk in Customer -02/22/2023 15:30:53", "transactionType": "CASH", "userId": 11397123, "retailShopId": 11332977, "itemIssuesDto" : [{ "item": "Item Name", "itemProductId": 11403631, "invItemSpecsId": 11403632, "buyingPrice": 5000, "unitCost": 6000, "qty": 1, "discount": 0, "taxIncExc": 0, "taxRateId": null, "taxRate": 0, "taxAmount": 0, "lineTotal": 6000 },{ "item": "Item Name", "itemProductId": 11403631, "invItemSpecsId": 11403632, "buyingPrice": 5000, "unitCost": 5500, "qty": 1, "discount": 0, "taxIncExc": 0, "taxRateId": null, "taxRate": 0, "taxAmount": 0, "lineTotal": 5500 }], "channelsDto" : [{ "channelId": 11403631, "referenceNo": "AP2323", "amount": 8000 },{ "channelId": 11403632, "referenceNo": "AP2343", "amount": 3500 }] }
Response
{ "success": "true", "message": "Successful" }