Add Expense

add expense

POST {{base-url}}Customers/addExpenses

This endpoint allows you to get free cakes.

Headers

Name
Type
Description

Content-Type

string

x-api-access

string

x-api-secret

string

x-customer-token

string

Request Body

Name
Type
Description

data

object

add one key in the request that is is_image true or false

image

string

upload image

request: -

{"name": "rahul", "amount": 50, "customer_id":720,  "collection_id": 1,  "is_image" : false, "metadata": {"date_of_expense": "10/09/2019"}}


response:- (without image)


{
    "success": true,
    "msg": "Customer bill created.",
    "data": {
        "id": "26605",
        "total": 50,
        "tax": 0,
        "grandTotal": 50,
        "flagged": false,
        "business": false,
        "snippet": "rahul",
        "billParticularsCount": 1,
        "customerId": 720,
        "createdAt": "2020-04-27T12:57:24.390Z",
        "updatedAt": "2020-04-27T12:57:24.390Z",
        "metadata": "{\"date_of_expense\":\"10/09/2019\",\"type\":\"expense\"}",
        "download_url": null
    }
}

response:- (with image)

{
    "success": true,
    "msg": "Customer bill created.",
    "data": {
        "id": "26606",
        "total": 50,
        "tax": 0,
        "grandTotal": 50,
        "flagged": false,
        "business": false,
        "snippet": "rahul",
        "billParticularsCount": 1,
        "customerId": 720,
        "createdAt": "2020-04-27T14:16:02.560Z",
        "updatedAt": "2020-04-27T14:16:02.560Z",
        "metadata": "{\"date_of_expense\":\"10/09/2019\",\"type\":\"expense\",\"expense_image\":\"3KMiWNGkbwk8dmYYeVrbeT.jpeg\"}",
        "download_url": "https://billeasy-demo.s3.ap-south-1.amazonaws.com/uploads/customer/expense_image/720/26606/3KMiWNGkbwk8dmYYeVrbeT.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIY3CGKUZE7RXE2SA%2F20200427%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20200427T141602Z&X-Amz-Expires=180&X-Amz-Signature=bb467754f6d4d3689e3898b3583f30609ed7021f5a412a9e1ce4014706f11213&X-Amz-SignedHeaders=host"
    }
}

Last updated