get https://{host}/v1.1/transaction/get
This API allows you to fetch the details of a specific transaction based on the transaction id.
Notes
- Either transaction
numberoridis mandatory.- Only the main transaction level amount, gross amount and discount values are displayed in transaction currency (the currency in which the transaction was made) and the rest are displayed in the base currency (default currency set at organisation level).
Example request
curl --location 'https://eu.api.capillarytech.com/v1.1/transaction/get?format=json&number=test00tra' \
--header 'Authorization: Basic dGpfY2FwaWxsYXJ5OjVjMTc3MDJlOTI5NjQY3ZDJiMGM2ZTk5ZjE5' \
--header 'Cookie: _cfuvid=kT1kqAlyicvTpZehl3LUNV6zQ5yGGnkRef26o7SjzBI-1757601983154-0.0.1.1-604800000'
Request Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | long | Unique id of the transaction to fetch. |
| number | string | Unique transaction number that want to fetch. |
| store_code | string | Fetch the transactions of a specific store. Pass the store code. |
| till_code | string | Fetch the transactions of a specific TILL. Pass the respective TILL code. |
| amount | double | Filter transactions of a specific amount. |
| date | date-time | Filter transactions of a specific date. Pass the date in YYYY-MM-DD format. |
| type | Enum | Filter transactions of a specific type. Values: REGULAR, NOT_INTERESTED, RETURN, NOT_INTERESTED_RETURN, MIXED, NI_MIXED, ALL (to retrieve any transaction type, for mixed or NI mixed, it retrieves both transaction and return details). By default it shows the details of regular transaction. |
| tenders | boolean | Pass true to retrieve transaction details. |
| credit_notes | boolean | Pass true to retrieve credit notes. |
| user_id | boolean | Pass true to retrieve unique ID of the customer in response. |
If you attempt to retrieve data of any deleted customer after a successful PII deletion, you will receive the following response:
"message": "Customer is deleted after PII delete request"
Response parameters
The description in the line item is not the inventory level description but the description that you added while adding the transaction.
| Parameter | Description |
|---|---|
| response.status | Contains metadata about the API response. |
| • success | Indicates whether the API request was successful (true or false). |
| • code | HTTP status code for the response. |
| • message | Message describing the result of the API call. |
| response.transactions | Holds all transaction-related details. |
| • count | Total number of transactions returned in the response. |
| • transaction | Array of transaction objects containing individual transaction data. |
| transaction.customer | Information about the customer associated with the transaction. |
| • mobile | Customer’s mobile number. |
| • first_name | Customer’s first name. |
| • last_name | Customer’s last name. |
| Customer’s email address. | |
| • external_id | External customer ID, if any. |
| • source | Channel or source of transaction (for example, instore, online). |
| transaction.billing_till | Details of the billing till (point of sale terminal). |
| • code | Unique till code. |
| • name | Name of the till, if available. |
| transaction.billing_store | Store details where the transaction took place. |
| • code | Store code. |
| • name | Store name. |
| transaction.id | Unique identifier for the transaction. |
| transaction.number | Transaction reference number. |
| transaction.type | Transaction type (for example, REGULAR, RETURN). |
| transaction.outlier_status | Indicates whether the transaction is flagged as normal or outlier. |
| transaction.store | Store identifier linked to the transaction. |
| transaction.delivery_status | Delivery status of the transaction (for example, DELIVERED). |
| transaction.source | Source channel for the transaction (for example, instore, API). |
| transaction.custom_fields | Contains custom field details, if configured. |
| transaction.extended_fields | Holds additional metadata fields. |
| transaction.local_currency | Currency details showing base and transaction currency values. |
| • id | Unique ID for the currency mapping entry. |
| • ratio | Conversion rate between transaction currency and base currency. |
| • base_currency | Defines the base currency set in the organization. |
| • id | Base currency ID. |
| • name | Name of the base currency (for example, Indian rupee). |
| • symbol | Symbol of the base currency (₹). |
| • transaction_currency | Currency in which the transaction occurred. This is the currency set at the store level or using the transaction API with local currency. |
| • id | Transaction currency ID. |
| • name | Name of the transaction currency (for example, United States dollar). |
| • symbol | Symbol of the transaction currency ($). |
| • amount | Transaction amount in transaction currency. |
| • value | Converted amount in base currency. |
| • discount | Total discount applied in transaction currency. |
| • gross_amount | Gross transaction amount before discounts in transaction currency. |
| transaction.currency | Details of the transaction currency. |
| • ratio | Conversion ratio used. |
| • id | Transaction currency ID. |
| • name | Transaction currency name (for example, United States dollar). |
| • symbol | Transaction currency symbol ($). |
| transaction.amount | Total transaction amount in base currency. |
| transaction.billing_time | Date and time when the transaction was billed. |
| transaction.auto_update_time | Date and time when the transaction was last updated. |
| transaction.gross_amount | Total gross amount in base currency before discount. |
| transaction.discount | Discount applied at the transaction level in base currency. |
| transaction.notes | Notes or comments linked to the transaction. |
| **transaction.line_items | List of items included in the transaction. |
| • line_item | Array of individual line item details. |
| line_item.type | Type of item (for example, REGULAR). |
| line_item.serial | Serial number of the line item in the transaction. |
| line_item.item_code | Unique code identifying the item. |
| line_item.description | Description of the purchased item. |
| line_item.qty | Quantity of the item. |
| line_item.rate | Rate per item in base currency. |
| line_item.value | Line item total value in base currency. |
| line_item.discount | Discount applied at line-item level in base currency. |
| line_item.amount | Total amount for the line item after discount in base currency. |
| line_item.returnable | Indicates whether the item can be returned (true/false). |
| line_item.returnable_days | Number of days within which the item can be returned. |
| line_item.local_currency | Currency details for the line item. |
| • id | Currency record ID for the line item. |
| • ratio | Conversion rate used for the line item. |
| • base_currency | Base currency details (ID, name, symbol). |
| • transaction_currency | Transaction currency details (ID, name, symbol). |
| • amount | Line item amount in base currency. |
| • value | Line item value in base currency. |
| • rate | Rate per unit in base currency. |
| • discount | Discount value for the line item in base currency |
| line_item.combo_items / addon_items / split_items / attributes | Containers for additional item configurations or attributes (empty in this example). |
| transaction.item_status | Indicates the success of the transaction fetch operation. |
| • success | true if retrieval was successful. |
| • code | Response code for the fetch operation. |
| • message | Descriptive message about the operation result. |
