Skip to content

Sales

The Sales API provides live read access to transaction data for a single store, proxied directly from the RORC lane. All endpoints require an active RORCex install for the target store and are subject to lane availability.

Loyalty, offer, and coupon fields reflect the RORC lane's record

The loyalty_code, has_loyalty, has_offer, has_premium, and has_coupon filters (and the offerCode / premiumCode / loyaltyListCode aggregation dimensions) reflect how the RORC lane recorded each transaction. When a store uses an external loyalty service (such as EngageHQ or a third-party provider) via the RORC two-way interface, loyalty-driven discounts are applied at the lane as generic store coupons with no attribution to the external provider or its offers — they surface here under has_coupon, not as native offers/premiums. See the Promotions disclaimer for details and where to obtain provider-attributed reporting.


List or Retrieve Transactions

Return a paged list of transactions, or retrieve a single transaction when transaction_code is supplied.

GET /v1/sales/transactions

Authentication: OAuth Token (service_account or user)

Permission: rorcex:transactions.view

Request Query Parameters

FieldTypeRequiredDescription
store_org_idstringYesTarget store organization hashkey (org_[A-Za-z0-9]{11}). Must be within the caller's org scope.
transaction_codestringNoWhen supplied, returns a single transaction object instead of a paged list.
business_day_datestringNoFilter to a specific business day (Y-m-d).
business_day_fromstringNoStart of a business day range (Y-m-d), inclusive.
business_day_tostringNoEnd of a business day range (Y-m-d), inclusive.
cashier_codesstringNoCSV list of cashier codes to filter by.
terminal_codesstringNoCSV list of terminal codes to filter by.
media_codesstringNoCSV list of media (tender) codes to filter by.
product_codesstringNoCSV list of product codes to filter by.
department_codesstringNoCSV list of department codes to filter by.
loyalty_codestringNoFilter to transactions associated with this loyalty card code.
transaction_total_minnumberNoMinimum transaction total (inclusive).
transaction_total_maxnumberNoMaximum transaction total (inclusive).
is_voidbooleanNoFilter to voided (true) or non-voided (false) transactions.
is_refundbooleanNoFilter to refund (true) or non-refund (false) transactions.
is_no_salebooleanNoFilter to no-sale (true) or normal-sale (false) transactions.
is_training_modebooleanNoFilter to training-mode (true) or live (false) transactions.
has_loyaltybooleanNoFilter to transactions with or without a loyalty attachment.
has_offerbooleanNoFilter to transactions with or without an offer redemption.
has_premiumbooleanNoFilter to transactions with or without a premium redemption.
has_couponbooleanNoFilter to transactions with or without a coupon.
include_detailbooleanNoWhen true, include line-item detail in each transaction record.
offsetintegerNoPagination offset. Must be ≥ 0. Defaults to 0.
limitintegerNoPage size. Must be between 1 and 500. Defaults to 100.

Response

Paged list (no transaction_code supplied):

json
{
  "store_org_id": "org_00000k1L2m3N4o5",
  "data": [
    {
      "transactionCode": "22-647374",
      "businessDayDate": "2025-12-11T00:00:00",
      "terminalCode": "22",
      "cashierCode": null,
      "status": "FINALIZED",
      "transactionType": "TIMER",
      "startDateTime": "2025-12-10T23:17:47",
      "endDateTime": "2025-12-10T23:17:47",
      "isTrainingMode": false,
      "isNativeSCO": false,
      "itemCount": 3,
      "totalAmount": 12.47,
      "savingsTotal": 0,
      "tenderAmount": 12.47,
      "marginAmount": 4.10,
      "marginPercent": 32.9
    }
  ],
  "total": 396107,
  "offset": null,
  "limit": null
}

Single transaction (transaction_code supplied):

json
{
  "store_org_id": "org_00000k1L2m3N4o5",
  "transaction": {
    "transactionCode": "22-647374",
    "businessDayDate": "2025-12-11T00:00:00",
    "terminalCode": "22",
    "cashierCode": null,
    "agencyCode": null,
    "status": "FINALIZED",
    "transactionType": "TIMER",
    "startDateTime": "2025-12-10T23:17:47",
    "endDateTime": "2025-12-10T23:17:47",
    "isTrainingMode": false,
    "isNativeSCO": false,
    "order": { "...": "itemized line-item and tender detail" }
  }
}

Status: 200 OK

Row fields are returned in camelCase as received from the RORC lane (transactionCode, totalAmount, businessDayDate, …). total is the full match count; the lane does not echo pagination cursors, so offset and limit are null in the response even though the request accepts them. On the single-transaction response, the order object carries the itemized line and tender detail.

Errors

See Errors for authentication, authorization, upstream proxy, and store_not_found error shapes.


Aggregate Transactions

Aggregate transaction metrics grouped by a chosen dimension. Supports optional comparison breakdowns.

GET /v1/sales/transactions/aggregate

Authentication: OAuth Token (service_account or user)

Permission: rorcex:transactions.view

Request Query Parameters

FieldTypeRequiredDescription
store_org_idstringYesTarget store organization hashkey.
group_bystringYesDimension to group by. One of: businessDayDate, terminalCode, cashierCode, mediaCode, premiumCode, offerCode, loyaltyListCode, hour, dayOfWeek.
metricstringNoMetric to aggregate. One of: sales, units, transactions. Defaults to sales.
topintegerNoLimit results to the top N groups. Must be between 1 and 1000.
compare_bystringNoSplit each group by a boolean dimension. One of: hasPremium, hasOffer, hasLoyalty, hasCoupon, isTrainingMode, isNativeSCO.
business_day_datestringNoFilter to a specific business day (Y-m-d).
business_day_fromstringNoStart of a business day range (Y-m-d), inclusive.
business_day_tostringNoEnd of a business day range (Y-m-d), inclusive.
cashier_codesstringNoCSV list of cashier codes to filter by.
terminal_codesstringNoCSV list of terminal codes to filter by.
media_codesstringNoCSV list of media (tender) codes to filter by.
product_codesstringNoCSV list of product codes to filter by.
department_codesstringNoCSV list of department codes to filter by.
loyalty_codestringNoFilter to transactions associated with this loyalty code.
transaction_total_minnumberNoMinimum transaction total (inclusive).
transaction_total_maxnumberNoMaximum transaction total (inclusive).
is_voidbooleanNoFilter to voided (true) or non-voided (false) transactions.
is_refundbooleanNoFilter to refund (true) or non-refund (false) transactions.
is_no_salebooleanNoFilter to no-sale (true) or normal-sale (false) transactions.
is_training_modebooleanNoFilter to training-mode (true) or live (false) transactions.
has_loyaltybooleanNoFilter to transactions with or without a loyalty attachment.
has_offerbooleanNoFilter to transactions with or without an offer redemption.
has_premiumbooleanNoFilter to transactions with or without a premium redemption.
has_couponbooleanNoFilter to transactions with or without a coupon.

Response

json
{
  "store_org_id": "org_00000k1L2m3N4o5",
  "data": [
    {
      "key": "2025-12-24",
      "label": "2025-12-24",
      "transactionCount": 1676,
      "salesAmount": 68384.68,
      "itemCount": 12449,
      "averageTicket": 40.8023,
      "voidAmount": 405.01,
      "refundAmount": -289.57,
      "savingsAmount": 3400.88,
      "storeCouponAmount": 15,
      "vendorCouponAmount": 36.23,
      "loyaltySavingsAmount": 0
    }
  ]
}

Status: 200 OK

key / label carry the group_by value for the row. savingsAmount is the total markdown, with storeCouponAmount, vendorCouponAmount, and loyaltySavingsAmount breaking out coupon- and loyalty-driven savings as dollar amounts. Note these are unattributed amounts — see the Promotions disclaimer for how external-loyalty discounts are (and are not) represented.

Errors

See Errors for authentication, authorization, upstream proxy, and store_not_found error shapes.


Aggregate Transaction Products

Aggregate product-level metrics across transactions, grouped by a chosen dimension. Identical to the transaction aggregate except compare_by is not supported.

GET /v1/sales/transactions/products/aggregate

Authentication: OAuth Token (service_account or user)

Permission: rorcex:transactions.view

Request Query Parameters

FieldTypeRequiredDescription
store_org_idstringYesTarget store organization hashkey.
group_bystringYesDimension to group by. One of: businessDayDate, terminalCode, cashierCode, mediaCode, premiumCode, offerCode, loyaltyListCode, hour, dayOfWeek.
metricstringNoMetric to aggregate. One of: sales, units, transactions. Defaults to sales.
topintegerNoLimit results to the top N groups. Must be between 1 and 1000.
business_day_datestringNoFilter to a specific business day (Y-m-d).
business_day_fromstringNoStart of a business day range (Y-m-d), inclusive.
business_day_tostringNoEnd of a business day range (Y-m-d), inclusive.
cashier_codesstringNoCSV list of cashier codes to filter by.
terminal_codesstringNoCSV list of terminal codes to filter by.
media_codesstringNoCSV list of media (tender) codes to filter by.
product_codesstringNoCSV list of product codes to filter by.
department_codesstringNoCSV list of department codes to filter by.
loyalty_codestringNoFilter to transactions associated with this loyalty code.
transaction_total_minnumberNoMinimum transaction total (inclusive).
transaction_total_maxnumberNoMaximum transaction total (inclusive).
is_voidbooleanNoFilter to voided (true) or non-voided (false) transactions.
is_refundbooleanNoFilter to refund (true) or non-refund (false) transactions.
is_no_salebooleanNoFilter to no-sale (true) or normal-sale (false) transactions.
is_training_modebooleanNoFilter to training-mode (true) or live (false) transactions.
has_loyaltybooleanNoFilter to transactions with or without a loyalty attachment.
has_offerbooleanNoFilter to transactions with or without an offer redemption.
has_premiumbooleanNoFilter to transactions with or without a premium redemption.
has_couponbooleanNoFilter to transactions with or without a coupon.

Response

json
{
  "store_org_id": "org_00000k1L2m3N4o5",
  "data": [
    {
      "key": "0001234567890",
      "label": "WRAPPED CANDY",
      "salesAmount": 892.40,
      "units": 214,
      "transactionCount": 188
    }
  ]
}

Status: 200 OK

Rows are per-product sales rollups in camelCase, where key / label carry the product code and description. (This endpoint was unavailable on the lane used to validate these shapes, so the exact field set may vary by RORC contract version; it mirrors the transaction aggregate.)

Errors

See Errors for authentication, authorization, upstream proxy, and store_not_found error shapes.


Sales Summary

Return a pre-computed summary of sales for a single business day, broken down by a chosen dimension.

GET /v1/sales/summary

Authentication: OAuth Token (service_account or user)

Permission: rorcex:transactions.view

Request Query Parameters

FieldTypeRequiredDescription
store_org_idstringYesTarget store organization hashkey.
dimensionstringYesSummary dimension. One of: department, hourly, cashier, terminal.
business_day_datestringYesThe business day to summarize (Y-m-d).

Response

json
{
  "store_org_id": "org_00000k1L2m3N4o5",
  "dimension": "department",
  "business_day_date": "2026-05-02",
  "data": [
    {
      "departmentCode": "012",
      "departmentDescription": "PRODUCE",
      "salesCount": 2,
      "salesAmount": 6.50,
      "refundCount": 0,
      "refundAmount": 0,
      "netSalesAmount": 6.50
    }
  ]
}

Status: 200 OK

Row fields are camelCase and dimension-specific: the department dimension returns departmentCode / departmentDescription as shown, while cashier, terminal, and hourly return analogous rows keyed by that dimension's own code/label.

Errors

See Errors for authentication, authorization, upstream proxy, and store_not_found error shapes.


Changelog
DateChange
2026-06-11Initial publication.

ShopHero CommerceCore Platform