Keepup Store Docs
Home
  • Welcome
  • 💡Tutorials
    • Overview
    • Account Set Up
    • Sales
      • 💡How to Create a Quote, Invoice or Receipt
      • 💡How to Edit a Quote or an Invoice
      • 💡How to Record Payment for a Quote or an Invoice.
      • 💡How to Filter Sales
      • 💡How to Delete a Sale
      • 💡How to Print a Sale
    • Inventory
      • 💡How to Add a Product
      • 💡How to Edit a Product
      • 💡How to Filter Products
      • 💡How to Delete a Product
      • 💡How to Record Damaged or Lost Products
      • 💡How to Import Products
    • Orders
      • 💡How to Create an Order
      • 💡How to Update an Order
      • 💡How to Filter Orders
      • 💡How to Print Order Labels
      • 💡How to Delete an Order
    • Customers
      • 💡How to Add a Customer
      • 💡How to Import Customers
      • 💡How to Edit a Customer
      • 💡How to Filter Customers
      • 💡How to Delete Customers
      • 💡How to Message Customers
      • 💡How to View Customers Feedback
      • 💡How to Buy SMS/Email Bundle
    • Expenses
      • 💡How to Record an Expense
      • 💡How to Edit an Expense
      • 💡How to Record Payment for an Expense
      • 💡How to Filter Expenses
      • 💡How to Delete an Expense
      • 💡How to View Expenses Analytics
    • Subscription
      • 💡How to Renew Your Subscription
    • Storefront
      • 💡How to Set Up Your Storefront
      • 💡How to Publish and Unpublish Your Storefront
      • 💡How to Update Storefront Settings
      • 💡How to View Storefront Orders
      • 💡How to View Abandoned Carts
    • Purchase Order
      • 💡How to create a Purchase Order
      • 💡How to edit a Purchase Order
      • 💡How to filter Purchase Orders
      • 💡How to delete Purchase Orders
      • 💡How to update a Purchase Order status
      • 💡How to record payment for a Purchase Order
    • Business Settings
      • 💡How to Update Business Information
      • 💡How to Verify your Business
      • 💡How to Manage Your Business API
      • 💡How to Update Sale Settings
      • 💡How to Manage Your Tax Profiles
      • 💡How to Manage Your Delivery and Pick Up Locations
      • 💡How to Manage Your Online Payments Options
      • 💡How to Manage your Offline Payments Options
    • Raw Materials
      • 💡How to Add a Raw Material
      • 💡How to Edit a Raw Material
      • 💡How to Import Raw Materials
      • 💡How to Filter Raw Materials
      • 💡How to Delete a Raw Material
      • 💡How to Record Damaged or Lost Raw Materials
      • 💡How to Create a Manufacturing Order
      • 💡How to Edit a Manufacturing Order
      • 💡How to Filter Manufacturing Orders
      • 💡How to Update a Manufacturing Order Status
      • 💡How to Delete a Manufacturing Order
    • Team Members
      • 💡How to Add Team Members
      • 💡How to Update a Team Member's Permissions
      • 💡How to Filter Team Members
      • 💡How to Remove a Team Member
      • 💡How to View Team Members' Action Logs
    • Damages & Loss
      • 💡How to Filter Damages & Loss
      • 💡How to Edit a Damaged or Lost Item
      • 💡How to Delete a Damaged or Lost Item
    • How to Access Keepup Store Version 2.0
  • âš¡API
    • Introduction
    • Sales
      • âš¡List Sales
      • âš¡Fetch Sale
      • âš¡Add Sale
      • âš¡Edit Sale
      • âš¡Update Balance
      • âš¡Cancel Sale
      • âš¡Refund Sale
    • Products
      • âš¡List Products
      • âš¡Fetch Product
      • âš¡Add Product
      • âš¡Edit Product
Powered by GitBook
On this page
  • Endpoint
  • Headers
  • Path Parameters
  • Sample Requests
  • Sample Response
  1. API
  2. Sales

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);
});
<?php
$sale_id = 'YOUR_SALE_ID'; // Replace 'YOUR_SALE_ID' with your actual sale ID
$url = 'https://api.keepup.store/v2.0/sales/' . $sale_id;

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer API_KEY' // Replace 'API_KEY' with your actual API key
  ],
]);

$response = curl_exec($curl);

if (curl_errno($curl)) {
    echo 'Error:' . curl_error($curl);
} else {
    echo $response;
}

curl_close($curl);
?>

import requests

sale_id = 'YOUR_SALE_ID'  # Replace 'YOUR_SALE_ID' with your actual sale ID
url = f'https://api.keepup.store/v2.0/sales/{sale_id}'
headers = {
    'Authorization': 'Bearer API_KEY'  # Replace 'API_KEY' with your actual API key
}

try:
    response = requests.get(url, headers=headers)
    print(response.json())
except requests.exceptions.RequestException as e:
    print(e)

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": []
        }
    }
}
{
    "status": 401,
    "error": "Authentication invalid"
}
PreviousList SalesNextAdd Sale

Last updated 1 year ago

âš¡
âš¡