URL: {{base_url}}/modules/revenue/add

Method: POST

Bearer Token: Replace this with an actual token in the request

Headers

Subscription: Replace this with the subscription value

Access_Token: Replace this with the actual access token value

Request Body

KeyValuesRequired
uidEnter a unique sale idYes
customer_idEnter the customer id for known customers or open when selling to the open marketYes
paymentEnter payment method. Value should be cash,bank or creditYes
dateEnter date of the saleYes
itemsNested json of a itemsYes

Json of the Items Key

KeyValuesRequired
codeInventory or service code of the sold itemYes
quantityEnter quantity of the sold item.Yes
unit_pricePrice at which you sold the itemYes
categoryEnter item category of the item. Value should either be inventory or serviceYes

Response Codes

CodeDescription
201Successful
500Internal Server Error
401Unauthorized: Check error message

Below is an example of json request body

    {
        "uid":2,
        "customer_id":"open",
        "payment":"cash",
        "date":"2024-01-02",
        "items":[
            {
            "code": 101,
            "quantity":10,
            "unit_price":50,
            "category":"inventory"
        }
        ]
        
    }