Fetch Sale

Fetches details of a specific sale using the sale ID. This is useful for viewing complete sale details.

Endpoint

GET https://api.keepup.store/v2.0/sales/{sale_id}

Headers

Authorization: Bearer API_KEY

Path Parameters

sales_id

number

required

The ID of the sale whose details are being requested. This should be passed as part of the URL

Sample Requests

const axios = require('axios');

const sale_id = 'YOUR_SALE_ID'; // Replace 'YOUR_SALE_ID' with your actual sale ID
const config = {
    method: 'get',
    url: `https://api.keepup.store/v2.0/sales/{sale_id}`,
    headers: {
        'Authorization': 'Bearer API_KEY' // Replace 'API_KEY' with your actual API key
    }
};

axios(config).then(function(response) {
    console.log(JSON.stringify(response.data));
}).catch(function(error) {
    console.error(error);
});

Sample Response

{
    "status": 200,
    "message": "Sale found",
    "data": {
        "sale_info": {
            "sale_id": 46099,
            "sale_number": "62",
            "customer_uuid": "12345",
            "customer_name": "Maureen",
            "customer_phone_number": "+2332612345678",
            "customer_email": "[email protected]",
            "issued_by": "Jojo",
            "total_amount": "500.00",
            "amount_paid": "500.00",
            "change": "0.00",
            "amount_received": "500.00",
            "balance_due": "0.00",
            "delivery_pickup": null,
            "discount": {
                "discount_amount": "0.00",
                "discount_percentage": "0.00",
                "discount_type": "fixed"
            },
            "tax_profile_id": null,
            "tax_amount": "0.00",
            "taxes": null,
            "status": "receipt",
            "sale_origin": "business",
            "viewed": 3,
            "viewed_at": "2023-06-01 12:12:50",
            "note": null,
            "customer_note": null,
            "share_link": "https://keepup.store/v/ZUSAPZ-01623188",
            "a4_print_link": "https://keepup.store/v/ZUSAPZ-01623188/a4-print",
            "thermal_print_link": "https://keepup.store/v/ZUSAPZ-01623188/thermal-print",
            "items": [
                {
                    "item_type": "service",
                    "item_name": "June Subscription 2023",
                    "description": null,
                    "price": "500.00",
                    "quantity": 1,
                    "total": "500.00"
                }
            ],
            "payment_log": [
                {
                    "updated_by": "Jojo",
                    "amount_received": "500.00",
                    "amount_paid": "500.00",
                    "balance_remaining": "0.00",
                    "payment_type": "MTN Mobile Money",
                    "created_at": "2023-06-01 12:10:20"
                }
            ],
            "order_log": [],
            "feedback": {
                "rate": null,
                "message": null
            },
            "sub_total": "500.00",
            "due_date": "2023-06-08 12:06:13",
            "issued_date": "2023-06-01 12:06:12",
            "created_at": "2023-06-01 12:08:32",
            "updated_at": "2023-06-01 12:10:20"
        },
        "outstanding_balance": {
            "meta": {
                "total_outstanding_balance_due": "0.00",
                "total_records": 0
            },
            "sales": []
        }
    }
}

Last updated