Get customer transactions

This API retrieves transaction details of a customer using customer ID.

API endpoint

  • To retrieve the transaction details of the customer use the endpoint given below:

https://{host}/v2/customers/{id}/transactions

  • To retrieve additional customer transaction information use the 'embed' query parameter. The supported embed parameters are: BILL_CF, BILL_EF, ATTRIBUTION, PAYMENT_MODES, CREDIT_NOTES, BILL_STORE_DETAILS, BILL_POINTS
  • When alternate currency is enabled for the org, the bill points information will also have alternate currency information with it.

https://{host}/v2/customers/{id}/transactions?embed=BILL_CF, BILL_EF, ATTRIBUTION, PAYMENT_MODES

Path parameter

Path parameterDescription
idCustomer ID of the customer.

Query parameter

ParameterDescription
BILL_CFCustom fields associated with the transaction.
BILL_EFExtended fields of the transaction.
ATTRIBUTIONAdditional details regarding the transaction.
PAYMENT_MODESModes of payment for the transaction.
CREDIT_NOTESNotes or references related to credits of the transaction.
BILL_STORE_DETAILSDetails of the store or outlet associated with the transaction.
startDateTransaction start date in the format YYYY-MM-DD HH:MM:SS.
endDateTransaction end date in the format YYYY-MM-DD HH:MM:SS.
sortByField by which the records are sorted. Only BILLING_TIMEis supported.
sortOrderOrder in which records are sorted. ASC and DESC are supported values.
Default order is DESC.
limitMaximum number of records to retrieve.
Default limit is 20.
Maximum limit is 1000.
offsetStarting point for records retrieval.
Default offset is 0.
BILL_POINTSInformation associated with the promised points, regular points, promotional points, alternate currencies.

Response parameter

Using customer ID
ParameterDescription
paginationContains information about the pagination of the data.
limitThe maximum number of records to return.
offsetThe starting point from which to retrieve records.
sortByThe parameter by which the data is sorted.
sortOrderThe order in which the data is sorted (e.g., "DESC" for descending).
totalThe total number of records available.
dataAn array containing the actual data records.
idThe unique identifier for the record.
customerIdThe ID of the customer associated with the record.
loyaltyLogIdThe ID of the loyalty log associated with the record.
billingTimeThe timestamp of when the billing occurred.
billNumberThe unique number associated with the transaction.
typeThe type of transaction (e.g., "REGULAR").
notesAny additional notes or comments associated with the transaction.
amountThe net amount of the transaction after discounts.
grossAmountThe original amount of the transaction before any discounts.
discountThe discount applied to the transaction.
outlierStatusThe status indicating if the record is an outlier or not (e.g., "NORMAL" or "OUTLIER").
warningsAn array containing any warnings related to the data retrieval.
totalTotal number of records.
Using EMBED=BILL_CF, BILL_EF, ATTRIBUTION, PAYMENT_MODES, CREDIT_NOTES, BILL_STORE_DETAILS
ParameterDescription
paginationAn object containing pagination details for the API response.
- limitThe maximum number of items returned per page (e.g., 20).
- offsetThe starting offset for the items in the current page (e.g., 0).
- sortByThe field used for sorting the data (e.g., "BILLING_TIME").
- sortOrderThe sorting order (e.g., "DESC" for descending order).
- totalThe total number of items available in the dataset (e.g., 107).
dataAn array of objects containing the main data of the response.
- idAn identifier for the data item.
- customerIdThe ID of the customer associated with the data.
- loyaltyLogIdThe ID of the loyalty log.
- billingTimeThe date and time of the billing event.
- billNumberThe bill number associated with the transaction.
- typeThe type of transaction (e.g., "RETURN" or "REGULAR").
- returnTypeThe type of return transaction (applicable for "RETURN" type).
- notesAdditional notes or comments related to the transaction.
- amountThe transaction amount.
- grossAmountThe gross transaction amount.
- discountThe discount applied to the transaction.
- outlierStatusThe status of the transaction (e.g., "NORMAL").
- billingStoreAn object containing details about the billing store.
-- idThe store ID.
-- codeThe store code.
-- descriptionThe store description.
-- nameThe store name.
-- typeThe store type.
-- adminTypeThe store admin type.
-- isActiveIndicates if the store is active.
-- isOuEnabledIndicates if OU (Organization Unit) is enabled for the store.
-- timeZoneIdThe time zone ID for the store.
-- currencyIdThe currency ID used by the store.
-- languageIdThe language ID used by the store.
- extendedFieldsAn object containing extended fields and their values.
-- CentralGSTThe Central GST value.
-- StateGSTThe State GST value.
-- amount_excluding_taxThe transaction amount excluding tax.
- creditNotesAn array of objects containing credit note details (if applicable).
-- numberThe credit note number.
-- amountThe credit note amount.
-- notesNotes related to the credit note.
-- referenceIdThe reference ID associated with the credit note.
- attributionAn object containing attribution details.
-- createDateThe date and time of creation.
-- createdByAn object containing details about the creator.
--- idThe creator's ID.
--- codeThe creator's code.
--- descriptionThe creator's description.
--- nameThe creator's name.
--- typeThe creator's type.
--- adminTypeThe creator's admin type.
--- isActiveIndicates if the creator is active.
--- isOuEnabledIndicates if OU (Organization Unit) is enabled for the creator.
--- timeZoneIdThe time zone ID for the creator.
--- currencyIdThe currency ID used by the creator.
--- languageIdThe language ID used by the creator.
-- modifiedByAn object containing details about the modifier (if applicable).
-- modifiedDateThe date and time of modification (if applicable).
warningsAn array of warning messages (if any).
errorsAn array of error messages (if any).

Using EMBED=BILL_POINTS
ParameterDescription
paginationObject containing pagination details.
- limitMaximum number of items to display per page.
- offsetIndex of the first item to be displayed.
- sortByField used for sorting the data.
- sortOrderSorting order (ascending or descending).
- totalTotal number of items available.
dataArray containing the main data objects.
- idUnique identifier for the transaction.
- customerIdID of the customer associated with the transaction.
- loyaltyLogIdID associated with the loyalty log.
- billingTimeDate and time of the transaction.
- billNumberUnique identifier for the bill.
- typeType of transaction (e.g., regular).
- notesAdditional notes or description of the transaction.
- amountTotal amount of the transaction.
- grossAmountGross amount of the transaction.
- discountDiscount applied to the transaction.
- outlierStatusStatus indicating if the transaction is considered an outlier (deviating from regular transaction).
- billPointsObject containing details about loyalty points earned from the bill.
- pointsBreakupBreakdown of points earned. Includes info on promised points, promotional points, regular points, and points awarded type with the associated program type and program ID.
- aggregatedBillPointsIncludes info on promised points, promotional points, and regular points with the associated program type and program ID.
- alternateCurrenciesBreakupBreakdown of alternate currencies earned with the related information. This is available when alternate currency is enabled for the org and awarded.
- aggregatedBillAlternateCurrenciesBreakdown of alternate currencies earned with the related information. This is available when alternate currency is enabled for the org and awarded.
warningsArray containing any warnings encountered during processing.
errorsArray containing any errors encountered during processing.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!