put
https://{host}/v2/transactions
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Negative values for transaction values such as amount, discount are not considered.
Note: Extended field updates are supported for
REGULAR,RETURN,NOT_INTERESTED, andNOT_INTERESTED_RETURNtransaction types.MIXEDtransactions are not supported.
Example request
curl --location --request PUT 'https://eu.api.capillarytech.com/v2/transactions?identifierName=mobile&identifierValue=919986000586' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bmVlc3RvcmV0aWxsc3NzoyMDJjYjk2MmFjNTkwNzViOTY0YjA3MTUyZDIzNGI3MA==' \
--header 'Cookie: _cfuvid=nqxTNRsWRIahnyM3eUc36V7PaRf1iZMfFubj3vNvPJA-1721630804772-0.0.1.1-604800000' \
--data '{
"id": 873547608,
"extendedFields": {
"ship_first_name": "Test1updatedagain",
"ship_last_name": "Singh",
"checkin_date":"2010-06-04 21:08:12",
"checkout_date":"2010-06-05 21:08:12"
},
"customFields": {
"ordersource": "testnee123updatedagain"
}
,
"lineItems":[{
"itemCode":"sku_234_2",
"extendedFields":
{
"MetalRate": "10577",
"GrossWeight": "10.50"
}
}]
}'Prerequisites
- The caller must have valid API credentials with write access to transactions.
- Extended fields and custom fields used in the request must be configured for the organisation.
Header information
| Header name | Description |
|---|---|
| SKIP-DOWNSTREAM | If set to true, the API request updates the customer transaction record directly without notifying downstream systems such as the Loyalty Engine (EMF) or event notification services, and no side effects will be generated. This allows the API to behave like a data import, where no loyalty actions or event triggers are executed. |
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
identifierName | enum | Conditional | Registered identifier name of the customer. Values: mobile, email, externalId, id, wechat, martjackid, fbId, cardnumber, cardExternalId. Not required for NOT_INTERESTED and NOT_INTERESTED_RETURN transaction types. |
identifierValue | string | Conditional | Value for the chosen identifier (e.g. mobile number if identifierName is mobile). Not required for NOT_INTERESTED and NOT_INTERESTED_RETURN transaction types. |
source | enum | Optional | Source from which the transaction was made. Values: INSTORE, WECHAT, MARTJACK, WEB_ENGAGE, ECOMMERCE, JD, TAOBAO, TMALL, FACEBOOK, WEBSITE, OTHERS. |
accountId | string | Optional | Account ID for sources with multiple accounts (e.g. MARTJACK, WECHAT). Not applicable for INSTORE. |
Body parameters
Note: The Updatable column indicates whether a field can be changed after the transaction is recorded. Fields marked No are used to identify the transaction and cannot be modified.
| Field | Type | Required | Description | Updatable |
|---|---|---|---|---|
id | long | Conditional | Unique transaction ID generated internally. Required if number is not provided. | No |
number | string | Conditional | Unique transaction number. Required if id is not provided. If a bill number matches multiple transactions, use id instead to identify the transaction uniquely. | No |
type | enum | Optional | Transaction type hint for lookup scoping. Values: REGULAR, RETURN, NOT_INTERESTED, NOT_INTERESTED_RETURN. Defaults to REGULAR if omitted. | No |
extendedFields | obj | Optional | Transaction-level extended fields as name-value pairs. Supported for REGULAR, RETURN, NOT_INTERESTED, and NOT_INTERESTED_RETURN types.Extended fields cannot be updated for MIXED transactions. | Yes |
customFields | obj | Optional | Transaction-level custom field details as name-value pairs. Supported for REGULAR, RETURN, NOT_INTERESTED, and NOT_INTERESTED_RETURN types. Not supported for MIXED transactions. | Yes |
deliveryStatus | enum | Optional | Delivery status of the transaction. Values: PLACED, PROCESSED, SHIPPED, DELIVERED, RETURNED. | Yes |
lineItems | array | Optional | Array of line item objects to update. Either itemCode or line item id is required to identify each line item. | Yes |
lineItems.itemCode | string | Conditional | Item code of the line item. Required if line item id is not provided. | No |
lineItems.id | int | Conditional | Line item ID generated during transaction creation. Required if itemCode is not provided. | No |
lineItems.extendedFields | obj | Optional | Line item-level extended field details as name-value pairs. | Yes |
lineItems.outlierStatus | enum | Optional | Outlier status for the line item. Supported for REGULAR and NOT_INTERESTED types only. Not supported for RETURN and NOT_INTERESTED_RETURN. | Yes |
Example response
{
"id": 873547608,
"extendedFields": {
"ship_first_name": "Test1updatedagain",
"ship_last_name": "Singh",
"checkin_date":"2010-06-04 21:08:12",
"checkout_date":"2010-06-05 21:08:12"
},
"customFields": {
"ordersource": "testnee123updatedagain"
}
,
"lineItems":[{
"itemCode":"sku_234_2",
"extendedFields":
{
"MetalRate": "10577",
"GrossWeight": "10.50"
}
}]
}Response parameters
| Parameter | Datatype | Description |
|---|---|---|
| extended_fields | obj | Extended field details of the transaction that are updated. |
| custom_fields | obj | Custom field details of the transaction that are updated. |
| id | long | Unique ID of the transaction generated by the system. |
| number | string | Bill or transaction number. |
| type | enum | Current transaction type. |
| customer | obj | Customer details associated with the transaction. |
Error & warning codes
| Code | Error number | Type | Description |
|---|---|---|---|
ERR_TRANSACTION_ID_NUMBER_INVALID | 667 | Error | Transaction ID not found for this customer. HTTP 400. |
ERR_DUPLICATE_BILL_NUMBER_USE_ID | 668 | Error | Bill number matches multiple transactions. Pass the transaction id instead of number to identify the transaction uniquely. HTTP 400. |
| — | 669 | Error | Unable to update the custom field. HTTP 400. |
NoteCustom fields can only be added if they meet the following conditions:
- The field must exist in the
custom_fieldstable for the particular organization.- It must belong to the same
org_idas the current use-case.- The field’s scope must be set to
LOYALTY_REGISTRATION.
NoteExtended fields that you use must match with the extended fields defined in the respective organization.
