Lets you add or return one or more transactions to the Capillary system. It supports both loyalty and not-interested transactions.
Notes
- To avoid any confusion related to timezone conversion, you can raise a ticket and enable the CONF_ORG_DISABLE_MACHINE_TIME_CONV configuration. When the configuration is enabled, the time from the payload, without the UTC offset, is stored in the database for all clusters. For more information, refer to the documentation here.
- You cannot register a customer with this API. Hence, you need to pass only registered identifiers for regular transactions.
- You can enable the configuration CONF_ALLOW_TRANSACTION_RETURN_AFTER_GROUP_TRANSITION to allow returns for former group members . When this config is active and when a return transaction is performed for a user who has left the group, the points allocated to the group as part of the original transaction are also reverted. To enable, raise a ticket to the Product Support Team.
- CONFIG_SKIP_SECONDARY_ID_ON_PRIMARY_MISMATCH is enabled: If the primary identifier is different but any of the secondary identifiers exist, a new customer is registered with the primary identifier ignoring the secondary identifier. The config is available on the Registration Page of InTouch Profile > Organization Settings > Miscellaneous.
Rate Limit
Region | Default Limit (RPM) |
---|---|
Asia-2 (Singapore) | 1200 |
Asia-1 (N. Virginia) | 700 |
EMEA (Ireland) | 300 |
Request Body Parameters
Parameter | Type | Description |
---|---|---|
identifierType* | Enum | Pass any of the registered identifier name of the customer. |
identifierValue* | string | Pass the respective identifier value. |
source* | Enum | Pass the source from which the transaction is made. |
accountId | string | For sources with multiple accounts (such as MARTJACK, WECHAT), pass the respective account ID. |
type* | Enum | Type of transaction. |
notInterestedReason | string | Notes on why the customer is not interested to enroll into the loyalty (type=NOT_INTERESTED). |
returnType** | Enum | For a return transaction, pass the return type. |
billNumber* | string | Unique transaction number. For a return transaction, this is the original transaction number of the return item. In transaction add the uniqueness of the billNumber is either at till, store, or org, depends on the configuration.
|
id | long | Transaction ID of the transaction that needs to be returned. Identifies the specific transaction to be returned when identical bill numbers exist across different transactions.
|
billAmount* | double | Net Transaction amount. |
billingDate | date-time | Date and time of the transaction in the ISO 8601 |
discount | double | Discount availed for the transaction or line item (discount amount). |
grossAmount | double | Transaction amount before discount. |
outlierStatus | Enum | Transaction level outlier status. |
note | string | Additional information about the transaction. |
deliveryStatus | Enum | Delivery status of the item. |
userGroup2Id | int | Unique ID of the user group to which the transaction needs to be associated with. |
userGroup2PrimaryUserId | long | Unique user ID of the primary member of group to which the transaction needs to be associated with. |
userGroup2ExternalId | string | Unique external ID of the user group to which the transaction needs to be associated with. |
userGroup2PrimaryUserIdentifierType | Enum | Identifier type used to identify group primary member. |
userGroup2PrimaryUserIdentifierValue | string | Value of the specified group identifier type. |
userGroup2PrimaryUserSource | Enum | Source in which the identifier of the group primary member is registered. |
userGroup2PrimaryUserAccountId | string | Account ID for sources with multiple accounts such as WECHAT. |
currencyCode | string | ISO currency code of the transaction to add transaction with local currency. For example, |
addWithLocalCurrency | boolean | Pass |
purchaseTime* | date-time | Billing time of regular transactions, for which a return is happening in ISO 8601 standard - |
promotionEvaluationId | string | Promotion evaluation code (cart/catalog) applied for the transaction. |
appliedPromotionIdentifiers | array | Base 64 encoded string of Cart/catalog promotion identifiers that are applied to the transaction. |
loyaltyPromotionIdentifiers | array | Identifier(s) of loyalty promotion(s) that you want to tag to the transaction. |
extendedFields | obj | Valid transaction level extended field details in name and value pairs. |
lineItemsV2 | obj | Details of line-items. |
attribution | obj | Mapping to tag the transaction to a different user or till (other than the current user) |
redemptions | obj | Details of points and coupon redemptions for the transaction. |
paymentModes | obj | Payment details used for the transaction. |
Attribution Object
Parameter | Type | Description |
---|---|---|
createDate | date-time | Date of the transaction in ISO 8601 standard format. |
createdBy | obj | User ID or store entity (like TILL ID, store ID) associated with the transaction. |
code | string | Unique code of the entity. |
type | Enum | Type of the attribution entity. |
lineItemsV2 object
Parameter | Type | Description |
---|---|---|
amount | double | Net line item amount. value-discount=amount |
description | string | One or two liner description of the line-item. |
discount | int | Discount received on the line item. |
itemCode | string | Unique code of the transaction line-item. |
qty | double | Quantity of the current line-item. |
rate | double | Price of each line-item. |
serial | string | Serial number of the line-item. |
value | double | Gross amount of the item. Usually, rate*qty=value. |
returnable | boolean | Pass |
returnableDays | int | Maximum number of days the item is allowed to return. |
customFields | obj | Transaction or line-item level custom field details. |
imgUrl | string | URL of the product image. |
attributes | obj | Details of combo, bundle, or split items. |
comboDetails | obj | Details of combo, bundle, or split items. |
addOnDetails | obj | Details of add-on items. |
splitDetails | obj | Details of split item. |
parentBillNumber | string | Return transaction number/Actual transaction number of the return item. Applicable only for mixed transaction (involves both transaction and return). |
purchaseTime* | date-time | Billing time of regular transactions, for which a return is happening in ISO 8601 standard - |
returnType | Enum | Return type of the line item. |
type | Enum | Type of the line item. |
appliedPromotionIdentifiers | array | Based 64 encoded format Cart or catalog promotions applied to the transaction. |
extendedFields | obj | Valid transaction line-item level extended field details. |
Redemptions Object
Parameter | Type | Description |
---|---|---|
pointsRedemptions | array | Unique points redemption id(s) that you want to apply for the transaction. |
couponRedemptions | array | Unique coupon redemption id(s) that you want to apply for the transaction. |
paymentModes Object
Parameter | Type | Description |
---|---|---|
mode | string | Mode of payment. |
value | double | Amount paid through the current mode. |
notes | string | Additional information related to the payment mode. Max characters - 250. |
attributes | obj | Attributes of the payment mode as name-value pairs. |
Error codes
Error code | Cause | Solution |
---|---|---|
Time mismatch between billing time and response time | Time conversion is not disabled. | Enable the CONF_ORG_DISABLE_MACHINE_TIME_CONV configuration. When the configuration is enabled, the time from the payload, without the UTC offset, is stored in the database for all clusters. For more information, refer to the documentation here. |
624: Invalid return transaction time, Return transaction should happen after add transaction | Incomplete body parameters | Parameter purchaseTime should be passed in the body. |
Note:
Custom fields can only be used at the customer, bills, and redemption levels; only extended fields are supported at the line item level.