Lets you update deliveryStatus, custom fields, and extended field details of a transaction.
API endpoint example
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"
}
}]
}'
Request Query Parameters
Parameter | Type | Description |
---|---|---|
identifierName | Enum | Pass any of the registered identifier name of the customer.
Values: |
identifierValue | string | Pass the respective identifier value. For example, if |
source | Enum | Pass the source from which the transaction is made. Values: |
accountId | string | For sources with multiple accounts (such as MARTJACK, WECHAT), pass the respective account ID. Not applicable for |
Request Body Parameter
Parameter | Type | Description |
---|---|---|
id | long | Unique id of the transaction generated internally. |
number | string | Unique transaction number that needs to be updated. |
extendedFields | obj | Valid transaction level extended field details in name and value pairs. |
customFields | obj | Valid transactional level custom field details in name and value pairs. |
lineItems | obj | Object to include line item level extended fields that need to be updated. Either item code or line item ID is mandatory to update the line item level extended fields. |
itemCode | string | Item code of the line item. |
id | int | Line item ID generated during addition of the transaction. |
deliveryStatus | Enum | Delivery status of the item.
Values: |
{
"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. |
NoteCustom fields can only be added if they meet the following conditions:
- The field must exist in the
custom_fields
table for the particular organization.- It must belong to the same
org_id
as 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.