Skip to main content

Generic Export Sales

generic export sale

This endpoint retrieves the sales of a shop within a given period.

GET ledger/export-sales/<shop_uuid>/json?start=<start_date>&end=<end_date>

Authentication

  • Uses signature authentication
HeaderDescription
X-SIGNATUREThe signature header of the request

See 2-security.md for information about how to create a valid signature.

The content looks something like this (line-breaks are added for readability, but should not be included):

client_id=POS_234,
host=kenzup.com,
method=GET,
timestamp=2020-02-12T19:20:30+01:00,
uri=/api/v1/ledger/export_sales/<shop_uuid>/json, payload=eyJhbW91bnQiOiAxMi40NSwgImN1cnJlbmN5IjogIk1BRCIsICJvcmRlcl9pZCI6ICJUWF8xMjM0NTY3ODkiLCAidGVybWluYWxfaWQiOiAiUE9TXzEyMzQ1Njc4OSIsICJ0aW1lIjogIjIwMjAtMDItMTJUMTk6MjA6MzArMDE6MDAifQ==,
signature=bc8mNftoUqwgBi1TepFxwk4KtzBa/Y3vgnPKYZd1ZkxU/Fa9He3suRtKMlvL3woXChegLo46A50nMk1mAqC5dZq0D9OPRdm8aY+3855fSoMCT2e6JYxOCZT7OtVj3czDj6bn3rNLKWkr+zPP+pAd55Atiu1udBf163SBcc6hP7M=

NB: 1 - uri shouldn't contain the params eg /api/v1/ledger/export_sales/<shop_uuid>/json?start=<start_date>&end=<end_date> 2 - method is GET 3 - payload content should be , before endcoding it to base64

Request Parameters:

ParameterTypeDescription
startstringused for specifying the starting date of the sales in the format YYYY-MM-DD
endstringused for specifying the ending date of the sales in the format YYYY-MM-DD
pageint(optional) used to specify the page number. Each page can contain a maximum of 10000 items
items_per_pageint(optional) used to specify the items per page. 1000 by default and 10000 max

Sample Request:

    https://app.kenzup.com/api/v1/ledger/export-sales/<shop_uuid>/json?start=<start_date>&end=<end_date>

"shop_uuid": b5f6e9e3-6848-49cd-bcc0-726cbe99bf68,
"start_date_": 2023-08-27,
"end_date": 2023-08-30

https://app.kenzup.com/api/v1/ledger/export-sales/<shop_uuid>/json?start=<start_date>&end=<end_date>&<items_per_page>=7000

"shop_uuid": b5f6e9e3-6848-49cd-bcc0-726cbe99bf68,
"start_date_": 2023-08-27,
"end_date": 2023-08-30,
"items_per_page": 7000

Response Parameters:

ParameterTypeDescription
earn_burnstringthe type of sale
amountstringthe amount earned by customer of the sale depending on the sale type
sale_amountstringthe original amount of the sale
payment_typestringthe payment type used eg card, out of app, points
points_pending_approvalbooleanif customer has points from the sale that must be manually assigned to him
shop_commercial_namestringname of shop
shop_idstringuuid of the shop
typestringtype of the shop
brandstringbrand of the shop
order_idstringthe order id of the sale
terminal_idstringthe id of the terminale used for the sale
agent_idstringid of the agent who proceesed the sale
sale_timestampstringtime the sale was created
mobile_numberstringmobile_number of customer who did the sale

Sample Response:

{
"total_items": 1,
"total_pages": 1,
"current_page": 1,
"items": [
{
"earn_burn": "earn",
"amount": 4.0,
"sale_amount": 10.0,
"payment_type": "dummy",
"points_pending_approval": false,
"shop_commercial_name": "sss",
"shop_id": "b5f6e9e3-6848-49cd-bcc0-726cbe99bf68",
"type": "auto",
"brand": "Afriquia",
"order_id": "",
"terminal_id": "",
"agent_id": null,
"sale_timestamp": "2023-08-26T10:25:34.088731Z",
"mobile_number": "+212111111111"
}]
}