api/v1/customer/receipts/all

GET

/api/v1/customer/receipts/all

This API method will grab detailed list of all receipts with its receipt items, store addresses for logged in user.

The parameter "filter-flag" can have value of "item" or keep any other string. This filter will work in conjunction with "search-min" and/or "search-max". If set to value "item", it will match "search-max" and/or "search-min" with "line_amount" of receipt_items array.

If "filter-flag" is set to any other string; Then, the "search-min" and "search-max" will apply to "sale_total" from the receipt itself.

Sample Request body

Column

Type / Value

Required

page

number

false

per_page

number

false

search

string

false

store-id

string

false

filter-flag

string

false

search-min

number

false

search-max

number

false

Sample Response

{
    "status": true,
    "item": [
        {
            "id": "846",
            "customer_id": 333,
            "account_id": 34,
            "location_id": 867,
            "register_number": 1,
            "cashier_number": "4142",
            "cashier_name": "Chinjal Modi",
            "receipt_number": 2,
            "sale_total": "60.00",
            "sale_timestamp": "2022-07-14 12:18:04",
            "cash_tendered": 0,
            "hide_receipt": 0,
            "address": "195 Lake Louise Marie RoadRock Hill, AL, 12775",
            "store_image": "http://controlcenter.ftx:81/stores/846/chain-logo",
            "store_name": "SC Choice Management",
            "customer": {
                "id": "333",
                "first_name": "Calvin",
                "last_name": "Mendels",
                "email": "[email protected]",
                "date_of_birth": "2018-10-28"
            },
            "receipt_items": [
                {
                    "id": "1063",
                    "account_id": 34,
                    "receipt_id": 846,
                    "item_id": 510,
                    "qty_sold": 1,
                    "line_amount": "60.00",
                    "receipt_name": "<p>Rocket Pop by Hype is every patriotical event all in one delicious vape juice. It’s the wonderful sight of red, white and blue in a Rocket Pop ice treat. Careful not to vape too fast. We know it’ll be a challenge. On the inhale a blast of summer flavor",
                    "department_id": 1,
                    "manufacturer_id": 228,
                    "brand_id": 192,
                    "is_lottery": 1,
                    "created_at": "2022-07-14 12:18:06",
                    "deleted_at": null
                }
            ]
        }
    ]
}
{
    "status": false,
    "errorCode": "NO_ITEMS",
    "message": "No items exist under your account"
}