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

    Interface SyncAccountsRequest

    Sync advertiser account state with a seller. Two modes, distinguished by the key on each per-account entry:

    • Provisioning mode (brand + operator + billing at the entry root, no account): opens an account. The agent names the brand and the operator, the account's parties, and sets the billing model and the account attributes. The account attributes are brand.countries, optional operator-owned operator_unit, optional fixed currency, conditionally required buyer-selected timezone, and sandbox. The seller MUST return the seller-assigned account_id, which is the account's identity, once the account is resolved. A seller never issues an account_id it might later change, so a pending_approval row that may still resolve to a different account carries request_id (experimental, account.requests) instead. A retry with the same idempotency_key returns the original result instead of opening another account. A provisioning entry never changes an existing account. When the entry matches exactly one account in the seller's account_scope, the seller SHOULD return that account_id instead of opening another, and the result row echoes the account's own attributes. A match follows the request_account deduplication guidance (/docs/accounts/tasks/request_account#deduplication): brand and operator, with each supplied attribute as a filter and billing terms never filtering. The exact-or-reject rules for billing and payment_terms still apply.

    • Settings-update mode (account field carrying an AccountRef): targets an existing account, preferably by account_id. The seller updates settable state and account attributes, brand.countries and billing included, without provisioning side effects. On this task, attribute changes go only through settings-update mode; request_account (account.requests) changes attributes too. The seller validates a changed attribute as it does when the account opens and rejects the entry with the same error. Currency, timezone, and sandbox are set at opening: a seller MAY refuse a currency or timezone change with UNSUPPORTED_FEATURE, and sandbox never changes. A seller that reviews a countries change reports pending_approval on the entry's result row, and the account keeps its current countries until the seller approves. The account_id never changes.

    Exactly one key shape is allowed per entry. A seller that opens buyer-declared accounts through sync_accounts accepts settings-update entries keyed by account_id and declines an attribute change it cannot make with UNSUPPORTED_FEATURE. A seller that does not provision through sync_accounts returns UNSUPPORTED_PROVISIONING for a provisioning entry, and an account-id-namespace seller that does not expose settings updates returns it for a settings-update entry. The deprecated operator_identity reconciliation is additionally gated by the deprecated get_adcp_capabilities.account.identity_updates.

    Where the seller supports the experimental account.requests surface (#8543), request_account opens and changes accounts, list_accounts reads them and their requests, and, where the seller supports them (account.status_changed in caller_event_types, media_buy.reporting_subscriptions), sync_principal registers webhooks and reporting; buyers SHOULD use those there. This task stays stable and available in 3.3, and is the path with sellers that do not support account.requests; its formal deprecation follows account.requests leaving experimental status. An entry that carries only notification_configs and/or reporting_delivery_configs is a subscription write: it MUST name an account the caller already holds (otherwise ACCOUNT_NOT_FOUND), and the seller MUST NOT provision, run account review, or change account attributes for it; it does not advance the account revision.

    interface SyncAccountsRequest {
        adcp_version?: string;
        adcp_major_version?: number;
        idempotency_key: string;
        accounts: (ProvisioningMode | SettingsUpdateMode)[];
        delete_missing?: boolean;
        dry_run?: boolean;
        push_notification_config?: PushNotificationConfig;
        context?: ContextObject;
        ext?: ExtensionObject;
    }
    Index
    adcp_version?: string

    Release-precision AdCP version (VERSION.RELEASE, e.g. "3.0", "3.1", "3.1-beta"). On a request: the buyer's release pin — the seller validates against its supported_versions and returns VERSION_UNSUPPORTED on cross-major mismatch, or downshifts to the highest supported release within the same major. On a response: the release the seller actually served — clients SHOULD validate the response against that release's schema, not against their pin. Patches are not negotiated; surface them as build_version on capabilities for operational visibility. When omitted, falls back to adcp_major_version (deprecated) or server default. Buyers SHOULD emit both adcp_version and adcp_major_version through 3.x to remain compatible with sellers that only read the legacy field. NORMALIZATION: SDKs that read full-semver values from bundle metadata (e.g. ComplianceIndex.published_version = "3.1.0-beta.1") MUST normalize to release-precision ("3.1-beta.1") before emitting on the wire — meta-field values are NOT valid wire values.

    adcp_major_version?: number

    DEPRECATED in favor of adcp_version (release-precision string). Servers MUST continue to honor this field through 3.x. Removed in 4.0. Original semantics: the AdCP major version the buyer's payloads conform to. Sellers validate against their supported major_versions and return VERSION_UNSUPPORTED if unsupported. When omitted, the seller assumes its highest supported version.

    idempotency_key: string

    Client-generated unique key for at-most-once execution. A provisioning entry can open an account, so this key is what prevents a retry from opening a second account and from firing onboarding webhooks, billing setup, and audit events twice. MUST be unique per (seller, request) pair. Use a fresh UUID v4 for each request.

    16

    255

    ^[A-Za-z0-9_.:-]{16,255}$

    accounts: (ProvisioningMode | SettingsUpdateMode)[]

    Per-account sync entries. Each entry uses one of two key shapes: the account field (AccountRef) for settings-update mode, or the flat brand + operator + billing trio for provisioning mode. A deprecated operator_identity settings update MUST carry the latest account revision.

    1000

    delete_missing?: boolean

    When true, the seller deactivates accounts this agent previously synced that this request does not include. An account counts as included only when an entry names it by account or the seller returns its account_id for an entry. A provisioning entry can open an account, so a buyer that keeps an account sends it as an { "account": { "account_id": ... } } entry. Scoped to the authenticated agent — does not affect accounts managed by other agents. Use with caution.

    dry_run?: boolean

    When true, preview what would change without applying. Returns what would be created/updated/deactivated.

    push_notification_config?: PushNotificationConfig
    context?: ContextObject