Browse Documentation
- Report
- Overview
- Organizations
- GET Get Organisation
- POST Update Organisation
- Invoices
- POST Create Invoice
- GET Get Invoice
- PUT Update Invoice
- DELETE Delete Invoice
- POST Approve Invoice
- POST Add Attachment
- DELETE Delete Attachment from Invoice
- POST Send Invoice
- POST Pay Invoice
- Purchases
- POST Create Purchase
- GET Get Purchase
- PUT Update Purchase
- DELETE Delete Purchase
- POST Approve Purchase
- POST Add Attachment to Purchase
- DELETE Delete Attachment from Purchase
- POST Pay Purchase
- Pos sales
- GET Get POS Sales
- POST Create POS Sale
- PUT Update POS Sale
- DELETE Delete POS Sale
- POST Add POSSales Payment
- Offers
- POST Create Offer
- GET Get Offer
- PUT Update Offer
- DELETE Delete Offer
- POST Add Attachment to Offer
- DELETE Delete Attachment from Offer
- POST Send Offer
- POST Convert to Invoice
- Items
- POST Create Item
- GET Get Item
- POST Update Item
- POST Add Item Picture
- DELETE Delete Item Picture
- Item categories
- Contacts
- POST Create Contact
- GET Get Contact
- PUT Update Contact
- Account types
- GET Account Types
- Accounts
- POST Create Account
- GET Get Account
- Financial accounts
- Taxes
- POST Create Tax
- GET Get Tax
- Invoice template
- GET Get Template
- POST Update Invoice Template
- POST Upload Template Logo
- POST Create New Invoice Template
- DELETE Delete Invoice Temaplate
- Inbox
- POST Upload Attachment
- GET Get Attachments
- DELETE Delete Attachment
- Payments
- DELETE Delete Payment
- Journals
- GET Get journals
- Banks
- GET List banks
- Team
- POST Create Team Member
- GET List Team Members
- DELETE Remove Team Members
POST Create pos sale
Create POS Sale
POST /pos/
Create a new POS Sale
Parameters
Parameter | Type | Description |
---|---|---|
client_id | String | The client you are creating the POS Sale for. This parameter is optional. In most cases the customer you're selling to is unknown |
email | String | Email address of the customer. Can be used for loyalty programs and sending digital receipts. |
mobile | String | Mobile phone number of the customer. Can be used for loyalty programs and sending digital receipts. |
date _issued | Date YYYY-MM-DD | The date the invoice was issued. Is not supplied it will default to the current date. |
date_due | Date YYYY-MM-DD | The expiration date of the invoice. If not supplied the number of days due of the default invoice template will be applied. |
reference | String | Any name that you wish to use as a reference |
status | String | Status of the POS sale. This can either be "draft" or "approved". If no status is defined it defaults to draft. The moment a POS sale is set to approved the journal entries are generated and no changes can be made anymore to the POS sale object. |
Items | required | Array[object] | Items to be added to the invoice |
items[item_id] | String | Id of a stored item |
items[title] | required | String | Item title |
items[description] | String | Description of the item |
items[quantity] | required | Numeric | Item Quantity |
items[price] | required | Numeric | Item Price |
items[tax_id] | String | Item Tax ID In case the tax_id is not provided the default tax rate will be applied to the item. |
items[gl_account_id] | String | GL Account In case no general ledger account was set the default sales account will be selected. |
A POST request is expected to be sent to the above endpoint where the content body must be JSON string containing all parameters that are needed to create a new invoice. The below example demonstrates how to create a new POS sale.
Request
{ "possale": { "date_issued": "2018-01-21", "email": "[email protected]", "phone": "+234123456789", "items": [ { "title": "T-Shirt", "description": "Size: L", "quantity": 1, "price": 100 }, { "title": "Trousers", "quantity": 3, "price": 30 } ] } }
Response
{ "id": "74f5276cc8fecfd46795a69ac4279dac7a6e8a06", "organization_id": "7331ecfc6eb6050a5f0c3c0e12b3b6e95cdf9ed5", "document_number": "_", "client_id": null, "total_amount": 190, "total_base_amount": 190, "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", "user": { "email" : "[email protected]", "name" : Test } "reference": null, "items": [ { "id": "c7911ebac167e77ddcb84bcbd676db6606cc9c06", "title": "T-Shirt", "description": "Size: L", "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": "e6c482bb56b47897922b3cfa4c0ca835d71ba1d5", "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 } } ], "clearings": [] }