@adcp/sdk API Reference - v17.0.0-rc.0
    Preparing search index...

    Type Alias AccountChange

    AccountChange: {} & {
        change_id: string;
        recorded_at: string;
        occurred_at?: string;
        batch_id?: string;
        resource: {
            type: string;
            account_id: string;
            resource_id: string;
            parent_ids?: { [k: string]: string | undefined };
        };
        action: string;
        origin: {
            kind: | "adcp"
            | "seller_operator"
            | "seller_system"
            | "connected_platform"
            | "unknown";
            connection_id?: string;
        };
        idempotency_key?: string;
        resource_revision?: number
        | string;
        changed_paths?: string[];
        repair: {
            task:
                | "list_accounts"
                | "get_media_buys"
                | "get_media_buy_delivery"
                | "list_creatives"
                | "sync_audiences"
                | "sync_event_sources"
                | "sync_catalogs"
                | "get_account_financials"
                | "list_products"
                | "get_signals"
                | "list_proposals";
            available?: boolean;
            unavailable_reason?: | "deleted"
            | "purged"
            | "legal_erasure"
            | "access_revoked"
            | "other";
        };
        actor?: {
            type: "principal"
            | "operator"
            | "system"
            | "platform"
            | "unknown";
            id?: string;
        };
        reason?: string;
        summary?: string;
        ext?: ExtensionObject;
    }

    Immutable metadata for one committed material change to account-scoped state recoverable through an authoritative AdCP read. The record is an ordered invalidation and audit aid, not a historical resource snapshot. Sellers MUST NOT include credentials, financial account numbers, raw audience members, raw logged events, webhook bodies, or unbounded before/after values.

    Type Declaration

      • change_id: string

        Stable seller-generated identifier for this logical change. Retries and notification re-emissions reuse this identifier.

      • recorded_at: string

        Time the seller committed or durably observed the change. Feed order is defined by the cursor, not by this timestamp.

      • Optionaloccurred_at?: string

        Upstream business time when the change occurred, only when the seller can establish it reliably.

      • Optionalbatch_id?: string

        Optional stable identifier grouping records produced by one committed operation or one external-source ingestion batch. Each independently repairable authoritative identity still receives its own record; batch_id does not change cursor ordering or notification identity.

      • resource: {
            type: string;
            account_id: string;
            resource_id: string;
            parent_ids?: { [k: string]: string | undefined };
        }

        Stable identity of the changed resource. Resource types are open for forward compatibility. account_id is always present; resource_id identifies the changed entity and parent_ids supplies any IDs needed to disambiguate nested resources.

        • type: string

          Open resource-type name such as account, media_buy, package, creative, creative_assignment, delivery_report, audience, event_source, catalog, account_financials, or invoice.

        • account_id: string

          Seller-assigned account containing the resource.

        • resource_id: string

          Canonical identifier for the resource within its type. For an account change this equals account_id.

        • Optionalparent_ids?: { [k: string]: string | undefined }

          Additional canonical parent identifiers needed to repair a nested resource, for example media_buy_id and package_id for a creative assignment. Keys and values MUST NOT contain sensitive payload data.

      • action: string

        Material change action. Standard values are created, discovered, updated, status_changed, linked, unlinked, deleted, and purged. Future standard or vendor-namespaced values are allowed; receivers MUST treat unknown values as generic invalidations.

      • origin: {
            kind:
                | "adcp"
                | "seller_operator"
                | "seller_system"
                | "connected_platform"
                | "unknown";
            connection_id?: string;
        }

        Server-derived origin classification. The seller MUST NOT trust caller-supplied origin or actor claims.

        • kind: "adcp" | "seller_operator" | "seller_system" | "connected_platform" | "unknown"
        • Optionalconnection_id?: string

          Opaque, non-secret reference to the connected source when safe for this caller.

      • Optionalidempotency_key?: string

        The idempotency_key of the AdCP request that produced this change, echoed only when origin.kind is adcp and only on records served to the principal that sent that request. Lets a buyer recognize its own changes. Sellers MUST omit it for every other reader of the account and MUST NOT include it in account.change_recorded notifications. Apart from this field, readers see the same record, subject to the redaction of actor and origin.connection_id described on those fields.

      • Optionalresource_revision?: number | string

        Post-change seller revision from the repair read (revision or seller_revision), when that family defines one.

      • Optionalchanged_paths?: string[]

        Bounded set of RFC 6901 JSON Pointers naming material fields that changed. Values are intentionally omitted. Required, and non-empty, when origin.kind is adcp or seller_operator, because the seller processed the mutation and knows what it changed; use the root pointer "" when the whole resource was created, deleted, or purged. Best-effort for seller_system and connected_platform.

        64

      • repair: {
            task:
                | "list_accounts"
                | "get_media_buys"
                | "get_media_buy_delivery"
                | "list_creatives"
                | "sync_audiences"
                | "sync_event_sources"
                | "sync_catalogs"
                | "get_account_financials"
                | "list_products"
                | "get_signals"
                | "list_proposals";
            available?: boolean;
            unavailable_reason?: | "deleted"
            | "purged"
            | "legal_erasure"
            | "access_revoked"
            | "other";
        }

        Authoritative AdCP read the receiver uses to reconcile current state. The buyer constructs safe request arguments from the structured resource identity. A deleted or legally purged resource may instead declare unavailable with a categorical reason.

        • task:
              | "list_accounts"
              | "get_media_buys"
              | "get_media_buy_delivery"
              | "list_creatives"
              | "sync_audiences"
              | "sync_event_sources"
              | "sync_catalogs"
              | "get_account_financials"
              | "list_products"
              | "get_signals"
              | "list_proposals"

          Allowlisted authoritative read task. This is a repair hint, never an instruction to dispatch dynamically. The buyer constructs and validates the request locally from the authenticated feed account and resource identity. list_proposals repairs resource.type proposal records (actions created and status_changed, with parent_ids.opportunity_id when the proposal has one); sellers MUST NOT emit proposal records to callers whose negotiated AdCP version is below 3.3. A proposal record older than the 30-day terminal retention repairs with available false and unavailable_reason deleted.

        • Optionalavailable?: boolean

          False when deletion or compelled erasure makes the resource unavailable on the repair read.

        • Optionalunavailable_reason?: "deleted" | "purged" | "legal_erasure" | "access_revoked" | "other"
      • Optionalactor?: {
            type: "principal" | "operator" | "system" | "platform" | "unknown";
            id?: string;
        }

        Optional privacy-safe actor classification. Sellers MUST omit direct personal identifiers unless the authenticated caller is authorized for them.

        • type: "principal" | "operator" | "system" | "platform" | "unknown"
        • Optionalid?: string

          Opaque, redaction-safe actor reference.

      • Optionalreason?: string

        Short machine-readable reason code, when available.

      • Optionalsummary?: string

        Optional brief, untrusted human-readable summary. MUST NOT contain secrets or sensitive payload data.

      • Optionalext?: ExtensionObject

        Bounded vendor extensions. The entire encoded change record, including extensions, MUST NOT exceed 64 KiB and remains subject to the same secret/PII prohibitions.