Skip to main content

/transactions

Overview

This endpoint retrieves purchase history for all members in the business. Unlike /member/transactions, this endpoint does not require a specific member to be identified and returns transactions across all members.

When to Use This Endpoint

Use this endpoint in the following cases:

  • To generate business-wide reports on all purchases
  • To analyze sales patterns and trends across all members
  • To export transaction data for business intelligence or accounting
  • To support business analytics and reporting needs
  • To audit or review all purchase activities in the system

Key Considerations

  • By default, returns transactions from the last 90 days when no date range is specified
  • Results can be filtered by custom date range using fromDate and toDate
  • Pagination is supported through the limit parameter
  • Includes both completed and cancelled transactions (identified by the cancelled flag)
  • Does not require a specific member to be identified
  • Returns transactions with member identification (membershipKey) included

Request Details

Method & URL

POST /transactions

See API Servers for the base URL to use in place of {{server}}.

Headers

HeaderTypeRequiredDescription
x-api-keystringYesAPI key for authentication
x-source-typestringYesOrigin of the request (e.g., POS, Web)
x-source-namestringYesName of the client or integration system
x-pos-idstringYesPOS terminal identifier
x-branch-idstringYesBranch or store location identifier

Request Body

FieldTypeRequiredDefaultDescription
limitintegerNo40Max number of records (1-100)
offsetintegerNo0Number of records to skip for pagination (≥0)
fromDatestringNo90 days agoFilter start date (ISO 8601 format)
toDatestringNoNowFilter end date (ISO 8601 format)

Request Example

curl --location --request POST 'https://{{server}}/v1/transactions' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{api-key}}' \
--header 'x-source-type: POS' \
--header 'x-source-name: pos_terminal_01' \
--header 'x-pos-id: POS001' \
--header 'x-branch-id: BR001' \
--data-raw '{
"limit": 10,
"offset": 0,
"fromDate": "2024-01-01T00:00:00Z",
"toDate": "2024-12-31T23:59:59Z"
}'

Success Response

{
"status": "success",
"transactions": [
{
"createdAt": "2024-06-15T15:00:00.000Z",
"openTime": "2024-06-15T14:00:00.000Z",
"transactionId": "TXN-001",
"totalAmount": 9990,
"tags": [],
"employee": "NONE",
"sourceName": "MyPOS",
"sourceVersion": "1.0.0",
"sourceType": "POS",
"cancelled": false,
"otherDiscountsTotal": 0,
"meansOfPayment": [
{
"type": "CASH",
"amount": 99.90
}
],
"items": [
{
"lineId": 1,
"code": "ITEM-001",
"name": "Coffee",
"departmentCode": "BVRG",
"departmentName": "Beverages",
"quantity": 2,
"grossAmount": 990,
"netAmount": 990,
"tags": []
}
],
"branchId": "BRANCH-01",
"posId": "POS-01",
"membershipKey": "member-unique-id",
"key": "transactions-unique-id",
"confirmation": "transactions-unique-id"
}
]
}

Response Fields

FieldTypeDescription
statusstringRequest status indicator
transactionsarrayArray of transaction objects
createdAtstringISO 8601 timestamp when transaction was created
openTimestringISO 8601 timestamp when transaction was opened
transactionIdstringPOS-generated transaction identifier
totalAmountnumberTotal transaction amount
tagsarrayTransaction-level tags
employeestringEmployee identifier
sourceNamestringName of the source system
sourceVersionstringVersion of the source system
sourceTypestringType of source (POS, KIOSK, etc.)
cancelledbooleanWhether the transaction was cancelled
otherDiscountsTotalnumberOther discounts not managed by the loyalty engine
meansOfPaymentarrayPayment methods used
itemsarrayList of purchased items
branchIdstringBranch identifier where transaction occurred
posIdstringPOS terminal identifier
membershipKeystringThe member's membership key
keystringInternal purchase key
confirmationstringUnique identifier for the transaction

Error Response Examples

Missing Required Header

{
"status": "error",
"error": {
"code": "101",
"message": "Missing X-Api-Key header"
}
}

Invalid Date Format

{
"status": "error",
"error": {
"code": "1002",
"message": "Invalid fromDate format. Use ISO 8601 format"
}
}

Internal Server Error

{
"status": "error",
"error": {
"code": "1020",
"message": "Internal server error"
}
}

Error Codes

CodeDescription
101Missing X-Api-Key header
102Missing X-Source-Type header
103Missing X-Source-Name header
104Missing X-Pos-Id header
105Missing X-Branch-Id header
1002Invalid fromDate format
1003Invalid toDate format
1020Internal server error
  • Generating business-wide sales and purchase reports
  • Analyzing sales trends and patterns across all members
  • Exporting transaction data for business intelligence tools
  • Supporting business analytics and reporting needs
  • Auditing all purchase activities across the business
  • Monitoring business performance and customer behavior