Get audit logs of entities

This page provides you with information on entity audit log API.

This API allows users to retrieve audit logs for specific entities. The API provides detailed records of actions and events associated with the chosen entity. At present, CUSTOMER and CARD entities are supported.

👍

For an overview on our APIs and for hands-on testing, refer to API overview and Make your first API call documentation.

Prerequisites

  • Basic or OAuth credentials
  • For Custom and Extended fields, make sure that the audit log trial for the entity is enabled. For more information, refer to the documentation on Setting up Entities and Fields.
  • Access to the Behavioural events access group. For information on access groups, refer to the access group documentation.

API features

FeatureAvailability/Info
PaginationYes
Rate limitRefer to rate limit documentation

API endpoint example

https://eu.api.capillarytech.com/v2/auditLog/get?entityType=CUSTOMER&entityId=98662653&source=INSTORE

Request query parameters

Parameter
(Parameters marked with * are mandatory)
TypeDescription
entityType*enumThe type of entity for which you want to fetch audit logs. Supported values: CUSTOMER, CARD.
entityId*LongThe unique identifier corresponding to the entity.
sourceStringThe source of the entity. For example, INSTORE, FACEBOOK, etc.
limitintThe number of results you wish to retrieve. Default value: 10.
pageNointThe page number, indicating which page of results to retrieve. Default value: 0.
sortByStringThe field by which results should be sorted. Default value: autoUpdateTime.
sortOrderenumThe order in which results should be sorted. Supported values: ASC, DESC.
startDateStringThe start date of the date range. Example: 2022-08-18 12:00:00.
endDateStringThe end date of the date range. Example: 2022-08-18 12:00:00.
referenceTypeEnumReference type. The supported values are Identifier, StandardField, ExtendedField, CustomField, CustomerStatus, CardStatus, SubscriptionStatus, CustomerMerge, CardCustomField, CommChannel, CardExtendedField. For Extended fields and Custom fields, audit logging is allowed for a maximum of 5 fields each.
referenceValueStringValue for the selected reference type.
includeUserContextBooleanEnter true to retrieve user context details such as entity type, entity ID, entity source and entity source ID.

Response parameters

{
  "entity": [
    {
      "updatedByUser": "aldo.till.1",
      "updatedBy": 75046492,
      "orgId": 100458,
      "entityType": "CUSTOMER",
      "entityId": 98662653,
      "createdOn": "2023-10-27T06:14:41Z",
      "requestId": "bb0d64d91e81a11daa729b169272f2c9",
      "till": {
        "code": "aldo.till.1",
        "name": "aldo.till.1"
      },
      "store": {
        "code": "aldo.demo",
        "name": "ALDO Store",
        "externalId": "aldo",
        "externalId1": "",
        "externalId2": ""
      },
      "userContextDetails": {},
      "source": "MAPP_SDK",
      "updatedByMode": "API",
      "autoUpdateTime": "2023-10-27T06:14:41Z",
      "events": [
        {
          "eventType": "CommChannel",
          "updatedField": "ios",
          "additionalFields": {
            "currentValue": "dDK3lNi4Bkznl_XRZ62N9A:APA91bEEwLV3Z4kartBUX27useNx_9SFmKuIpb9a67Tdmyt60eDR2WkgyE4QpIFFfYkIWRxldAweT9Kw1XDSN9pRD0BdUegmRHc4mHZjaPiicmspI7_Tar6E0Qu3Hpr6rS0AbhudykTw",
            "previousValue": "fCyvtyp0MkXjl_Rv4XUZ2F:APA91bGR32O5Bia8L15AM_EoHbsT5pQ_4y8w2AbX6tHX1Rtf94sS7AnsAz28ZZDwdLxf3urtAuWe9vfpVnjdOzoBMdRPb41wxNBvHz_PPpQ7fwmul8rDSRuCcyziPunb6EnFU1mQYRKB"
          }
        }
      ]
    },
    {
      "updatedByUser": "aldo.till.1",
      "updatedBy": 75046492,
      "orgId": 100458,
      "entityType": "CUSTOMER",
      "entityId": 98662653,
      "createdOn": "2023-10-17T05:39:54Z",
      "requestId": "29a5842046e0d7e7afe1fb0026a1f4f2",
      "till": {
        "code": "aldo.till.1",
        "name": "aldo.till.1"
      },
      "store": {
        "code": "aldo.demo",
        "name": "ALDO Store",
        "externalId": "aldo",
        "externalId1": "",
        "externalId2": ""
      },
      "userContextDetails": {},
      "source": "MAPP_SDK",
      "updatedByMode": "API",
      "autoUpdateTime": "2023-10-17T05:39:54Z",
      "events": [
        {
          "eventType": "CommChannel",
          "updatedField": "ios",
          "additionalFields": {
            "currentValue": "fCyvtyp0MkXjl_Rv4XUZ2F:APA91bGR32O5Bia8L15AM_EoHbsT5pQ_4y8w2AbX6tHX1Rtf94sS7AnsAz28ZZDwdLxf3urtAuWe9vfpVnjdOzoBMdRPb41wxNBvHz_PPpQ7fwmul8rDSRuCcyziPunb6EnFU1mQYRKB",
            "previousValue": "ccDgd3hcWETngR6bmSymYA:APA91bGLP-u00vHjkG4VtEtBg9zHGyU6Quh4wY02kl-RX2skSCAQ154IkhwwPsqW2WmFJpLYumF8aX33UqhGZeGBqgBvtW8WKi2mPioPb0UXOwdUjcIv-Z5yltd7-R9qlji753sis5NP"
          }
        }
      ]
    },
    {
      "updatedByUser": "aldo.till.1",
      "updatedBy": 75046492,
      "orgId": 100458,
      "entityType": "CUSTOMER",
      "entityId": 98662653,
      "createdOn": "2023-10-11T06:38:55Z",
      "requestId": "e5ce3a413fa381e00e1a05ee599b5acc",
      "till": {
        "code": "aldo.till.1",
        "name": "aldo.till.1"
      },
      "store": {
        "code": "aldo.demo",
        "name": "ALDO Store",
        "externalId": "aldo",
        "externalId1": "",
        "externalId2": ""
      },
      "userContextDetails": {},
      "source": "MAPP_SDK",
      "updatedByMode": "API",
      "autoUpdateTime": "2023-10-11T06:38:55Z",
      "events": [
        {
          "eventType": "CommChannel",
          "updatedField": "ios",
          "additionalFields": {
            "currentValue": "ccDgd3hcWETngR6bmSymYA:APA91bGLP-u00vHjkG4VtEtBg9zHGyU6Quh4wY02kl-RX2skSCAQ154IkhwwPsqW2WmFJpLYumF8aX33UqhGZeGBqgBvtW8WKi2mPioPb0UXOwdUjcIv-Z5yltd7-R9qlji753sis5NP",
            "previousValue": "c7Oe3wlXikz7uy9Xe2ysXS:APA91bFzO78PNQKj9z_sd6iG2OJB2Fj4PCMXNh4zY_y9Myhiq3OBRM_-0XpUZ4MtZ3RZetVHMR52Ul3c5JZa8zQf8ukdWI1qoOIq5UobAiYWzYudSTpuCun-u04VRZry6nqpHm77VzG2"
          }
        }
      ]
    },
    {
      "updatedByUser": "aldo.till.1",
      "updatedBy": 75046492,
      "orgId": 100458,
      "entityType": "CUSTOMER",
      "entityId": 98662653,
      "createdOn": "2023-10-09T18:21:56Z",
      "requestId": "ad157a6693f4b3ee2ad0a4d6a8fbbd56",
      "till": {
        "code": "aldo.till.1",
        "name": "aldo.till.1"
      },
      "store": {
        "code": "aldo.demo",
        "name": "ALDO Store",
        "externalId": "aldo",
        "externalId1": "",
        "externalId2": ""
      },
      "userContextDetails": {},
      "source": "MAPP_SDK",
      "updatedByMode": "API",
      "autoUpdateTime": "2023-10-09T18:21:56Z",
      "events": [
        {
          "eventType": "CommChannel",
          "updatedField": "ios",
          "additionalFields": {
            "currentValue": "c7Oe3wlXikz7uy9Xe2ysXS:APA91bFzO78PNQKj9z_sd6iG2OJB2Fj4PCMXNh4zY_y9Myhiq3OBRM_-0XpUZ4MtZ3RZetVHMR52Ul3c5JZa8zQf8ukdWI1qoOIq5UobAiYWzYudSTpuCun-u04VRZry6nqpHm77VzG2",
            "previousValue": "ccDgd3hcWETngR6bmSymYA:APA91bGLP-u00vHjkG4VtEtBg9zHGyU6Quh4wY02kl-RX2skSCAQ154IkhwwPsqW2WmFJpLYumF8aX33UqhGZeGBqgBvtW8WKi2mPioPb0UXOwdUjcIv-Z5yltd7-R9qlji753sis5NP"
          }
        }
      ]
    },
    {
      "updatedByUser": "aldo.till.1",
      "updatedBy": 75046492,
      "orgId": 100458,
      "entityType": "CUSTOMER",
      "entityId": 98662653,
      "createdOn": "2023-09-29T06:51:28Z",
      "requestId": "e560762090cfc4c174dc1096e0b457fb",
      "till": {
        "code": "aldo.till.1",
        "name": "aldo.till.1"
      },
      "store": {
        "code": "aldo.demo",
        "name": "ALDO Store",
        "externalId": "aldo",
        "externalId1": "",
        "externalId2": ""
      },
      "userContextDetails": {},
      "source": "MAPP_SDK",
      "updatedByMode": "API",
      "autoUpdateTime": "2023-09-29T06:51:28Z",
      "events": [
        {
          "eventType": "Identifier",
          "updatedField": "mobile",
          "additionalFields": {
            "currentValue": "9988776655",
            "previousValue": "9986000581"
          }
        }
      ]
    },
    {
      "updatedBy": 75070896,
      "orgId": 100458,
      "entityType": "CUSTOMER",
      "entityId": 98662653,
      "createdOn": "2023-09-28T11:17:05Z",
      "requestId": "2b47b859fa4e0d692b0cac7a200ef9cc",
      "userContextDetails": {},
      "source": "INSTORE",
      "updatedByMode": "API",
      "autoUpdateTime": "2023-09-28T11:17:05Z",
      "events": [
        {
          "eventType": "Identifier",
          "updatedField": "mobile",
          "additionalFields": {
            "currentValue": "9986000581",
            "previousValue": "9988776655"
          }
        }
      ]
    },
    {
      "updatedByUser": "aldo.till.1",
      "updatedBy": 75046492,
      "orgId": 100458,
      "entityType": "CUSTOMER",
      "entityId": 98662653,
      "createdOn": "2023-09-28T09:54:06Z",
      "requestId": "dc0c9ade4ae2aad242c45d11aed0e7f0",
      "till": {
        "code": "aldo.till.1",
        "name": "aldo.till.1"
      },
      "store": {
        "code": "aldo.demo",
        "name": "ALDO Store",
        "externalId": "aldo",
        "externalId1": "",
        "externalId2": ""
      },
      "userContextDetails": {},
      "source": "MAPP_SDK",
      "updatedByMode": "API",
      "autoUpdateTime": "2023-09-28T09:54:06Z",
      "events": [
        {
          "eventType": "CommChannel",
          "updatedField": "ios",
          "additionalFields": {
            "currentValue": "ccDgd3hcWETngR6bmSymYA:APA91bGLP-u00vHjkG4VtEtBg9zHGyU6Quh4wY02kl-RX2skSCAQ154IkhwwPsqW2WmFJpLYumF8aX33UqhGZeGBqgBvtW8WKi2mPioPb0UXOwdUjcIv-Z5yltd7-R9qlji753sis5NP",
            "previousValue": "cA55tcy2mkQ2vnWIPqwshG:APA91bHx4_vV8mIcVEYAUvCAmNvcqXkMt1V1Fm-2DTX7o578uIf3cnMQ1TsdGGDBhOXmMfrVlSN2sg8dHVKiROyzpwE3Cth04Cy01iadgLwnF88HsLXYygN8jKDFQjJ1Bse4K60BjG0a"
          }
        }
      ]
    },
    {
      "updatedByUser": "aldo.till.1",
      "updatedBy": 75046492,
      "orgId": 100458,
      "entityType": "CUSTOMER",
      "entityId": 98662653,
      "createdOn": "2023-09-25T07:45:36Z",
      "requestId": "e78c739fd512ed54710fffa4414ee018",
      "till": {
        "code": "aldo.till.1",
        "name": "aldo.till.1"
      },
      "store": {
        "code": "aldo.demo",
        "name": "ALDO Store",
        "externalId": "aldo",
        "externalId1": "",
        "externalId2": ""
      },
      "userContextDetails": {},
      "source": "MAPP_SDK",
      "updatedByMode": "API",
      "autoUpdateTime": "2023-09-25T07:45:36Z",
      "events": [
        {
          "eventType": "CommChannel",
          "updatedField": "ios",
          "additionalFields": {
            "currentValue": "cA55tcy2mkQ2vnWIPqwshG:APA91bHx4_vV8mIcVEYAUvCAmNvcqXkMt1V1Fm-2DTX7o578uIf3cnMQ1TsdGGDBhOXmMfrVlSN2sg8dHVKiROyzpwE3Cth04Cy01iadgLwnF88HsLXYygN8jKDFQjJ1Bse4K60BjG0a",
            "previousValue": "cOKEU5C0tEKShEvV4gBiMG:APA91bHMGI42dGKo5WB0WFgyzmqZTmcS0emXq7S6PiYkzBD2heWTd0MTmgQ7hgKZYCS7xz0Z_roBhFX9lCva5Rk1Gp3Qc0Q7Lx4ZBmRTOr_gJENZN_WHLe4PUQar8hlAssTLqWh3h2GH"
          }
        }
      ]
    },
    {
      "updatedByUser": "aldo.till.1",
      "updatedBy": 75046492,
      "orgId": 100458,
      "entityType": "CUSTOMER",
      "entityId": 98662653,
      "createdOn": "2023-09-25T06:36:44Z",
      "requestId": "5e00ff792565b3b7d557b4264914c620",
      "till": {
        "code": "aldo.till.1",
        "name": "aldo.till.1"
      },
      "store": {
        "code": "aldo.demo",
        "name": "ALDO Store",
        "externalId": "aldo",
        "externalId1": "",
        "externalId2": ""
      },
      "userContextDetails": {},
      "source": "MAPP_SDK",
      "updatedByMode": "API",
      "autoUpdateTime": "2023-09-25T06:36:44Z",
      "events": [
        {
          "eventType": "CommChannel",
          "updatedField": "ios",
          "additionalFields": {
            "currentValue": "cOKEU5C0tEKShEvV4gBiMG:APA91bHMGI42dGKo5WB0WFgyzmqZTmcS0emXq7S6PiYkzBD2heWTd0MTmgQ7hgKZYCS7xz0Z_roBhFX9lCva5Rk1Gp3Qc0Q7Lx4ZBmRTOr_gJENZN_WHLe4PUQar8hlAssTLqWh3h2GH",
            "previousValue": "eZXFRqqW70_stGXA8xFm62:APA91bHfcRMoDiSVQle2lr7CsUZn9hDUKVV_zj1ATt5HgckmpTgqmNfGEdPVkt4YlV9QKmH2ffWNdGeIvy3pl1zmq7szbUd9u3wNtF7VrgTJTCz2wIkFfYL2_O2yLerePSpy3ZsOZ3yF"
          }
        }
      ]
    },
    {
      "updatedByUser": "aldo.till.1",
      "updatedBy": 75046492,
      "orgId": 100458,
      "entityType": "CUSTOMER",
      "entityId": 98662653,
      "createdOn": "2023-09-20T15:18:43Z",
      "requestId": "b28863365c95fcb0c6bf67fe937b8419",
      "till": {
        "code": "aldo.till.1",
        "name": "aldo.till.1"
      },
      "store": {
        "code": "aldo.demo",
        "name": "ALDO Store",
        "externalId": "aldo",
        "externalId1": "",
        "externalId2": ""
      },
      "userContextDetails": {},
      "source": "MAPP_SDK",
      "updatedByMode": "API",
      "autoUpdateTime": "2023-09-20T15:18:43Z",
      "events": [
        {
          "eventType": "CommChannel",
          "updatedField": "ios",
          "additionalFields": {
            "currentValue": "eZXFRqqW70_stGXA8xFm62:APA91bHfcRMoDiSVQle2lr7CsUZn9hDUKVV_zj1ATt5HgckmpTgqmNfGEdPVkt4YlV9QKmH2ffWNdGeIvy3pl1zmq7szbUd9u3wNtF7VrgTJTCz2wIkFfYL2_O2yLerePSpy3ZsOZ3yF",
            "previousValue": "d2qtEUo8-0LbhCOZ7ZHyjC:APA91bFHzP4eEVpoLQrF3Mo9umWKL8y8g8tDKIHaJbtUMNdQOz3e5QMPmjGJNnWmX8rFCkT1aWhxsJSvbWbojQngn8gJRlX5fFjCR_21faOySmOswnUEP2kzu6PP1468QjjzyY4LZNY8"
          }
        }
      ]
    }
  ],
  "warnings": [],
  "errors": [],
  "success": true
}
ParameterDescription
entityAn array of entities with details about updates and events.
- updatedByUserThe username of the user who performed the update.
- updatedByThe unique identifier of the user who performed the update.
- orgIdThe organization ID to which the entity belongs.
- entityTypeThe type of entity being updated (e.g., CUSTOMER, Standard Field, CardExtendedField).
- entityIdThe unique identifier of the entity being updated.
- createdOnThe timestamp when the update was created.
- requestIdA unique identifier for the request associated with the update.
- tillDetails about the till, including its code and name.
- storeDetails about the store, including its code, name, and external IDs.
- userContextDetailsAdditional user context details, if available.
- sourceThe source of the update (e.g., INSTORE).
- updatedByModeThe mode of the update (e.g., API).
- autoUpdateTimeThe timestamp when the update occurred automatically.
- eventsAn array of events associated with the update.
- eventTypeThe type of event (e.g., ExtendedField).
- updatedFieldThe field that was updated (e.g., vehicle_type).
- additionalFieldsAdditional fields associated with the event, including the current and previous values.
- currentValueThe current value of the updated field.
- currentValueIdThe identifier of the current value.
- previousValueThe previous value of the updated field.
- previousValueIdThe identifier of the previous value.
warningsAn array of warning messages, if any.
errorsAn array of error messages, if any.
successIndicates whether the operation was successful (true/false).
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!