Contents

ActivityDetail

A group of field-level changes that occurred within a single activity context in a change details record.

Declaration

object ActivityDetail

Properties

NameTypeDescription
transactionIdstring

The identifier of the transaction this activity belongs to. Matches the transactionId on the parent ChangeDetails record. Read-only.

changes[ActivityDetail.Changes]

An array of ActivityDetail.Changes field change objects, one per field that changed in this activity. Each object contains three keys: field (string, the API field name that changed), oldValues (array of string, values before the change, empty for CREATE events), and newValues (array of string, values after the change, empty for DELETE events). Read-only.

Discussion

Locate ActivityDetail in the response hierarchy

Change history detail responses use a three-level nesting:

ChangeDetails
 └── details: ActivityDetail[]
 └── changes: [{ field, oldValues, newValues }]

Each ChangeDetails record has one or more ActivityDetail entries in its details array. Each ActivityDetail groups the field-level changes that share a common activity context within the transaction. In most cases, a single ActivityDetail contains all field changes for the entity.

Iterate over field changes

To access individual field changes, iterate the changes array on each ActivityDetail:

"details": [
  {
    "transactionId": "txn_abc123def456",
    "changes": [
      { "field": "status", "oldValues": ["PAUSED"], "newValues": ["ENABLED"] },
      { "field": "dailyBudget", "oldValues": ["50.00"], "newValues": ["100.00"] }
    ]
  }
]

The API encodes all values in oldValues and newValues as strings, regardless of the underlying field type. Parse them according to the field’s expected type.

Example

{
  "transactionId": "txn_abc123def456",
  "changes": [
    {
      "field": "status",
      "oldValues": ["PAUSED"],
      "newValues": ["ENABLED"]
    },
    {
      "field": "dailyBudget",
      "oldValues": ["50.00"],
      "newValues": ["100.00"]
    }
  ]
}

Topics

Dictionaries

See Also