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

    Interface SyncAccountsSuccess

    Sync operation processed accounts (individual accounts may be pending or have action=failed)

    interface SyncAccountsSuccess {
        dry_run?: boolean;
        accounts: {
            account_id?: string;
            request_id?: string;
            resolution?: AccountRequestResolution;
            account?: AccountReference;
            brand?: BrandReference;
            operator?: string;
            operator_unit?: OperatorUnit;
            revision?: number;
            identity_change?: AccountIdentityChange;
            identity_change_preview?: AccountIdentityChangePreview;
            currency?: string;
            timezone?: string;
            name?: string;
            action: "created" | "updated" | "unchanged" | "failed";
            status?:
                | "rejected"
                | "active"
                | "pending_approval"
                | "payment_required"
                | "suspended"
                | "closed";
            billing?: BillingParty;
            billing_entity?: BusinessEntity;
            destination_billing_entity?: {};
            account_scope?: AccountScope;
            setup?: {
                url?: string;
                message: string;
                expires_at?: string;
                waiting_on?: PendingActionParty;
                kind?: PendingActionKind;
            };
            rate_card?: string;
            payment_terms?: PaymentTerms;
            credit_limit?: { amount: number; currency: string };
            errors?: Error[];
            warnings?: string[];
            sandbox?: boolean;
            notification_configs?: NotificationConfig[];
            reporting_delivery_configs?: ReportingDeliveryConfigurationState[];
            authorization?: AccountAuthorization;
        }[];
        context?: ContextObject;
        ext?: ExtensionObject;
    }
    Index
    dry_run?: boolean

    Whether this was a dry run (no actual changes made)

    accounts: {
        account_id?: string;
        request_id?: string;
        resolution?: AccountRequestResolution;
        account?: AccountReference;
        brand?: BrandReference;
        operator?: string;
        operator_unit?: OperatorUnit;
        revision?: number;
        identity_change?: AccountIdentityChange;
        identity_change_preview?: AccountIdentityChangePreview;
        currency?: string;
        timezone?: string;
        name?: string;
        action: "created" | "updated" | "unchanged" | "failed";
        status?:
            | "rejected"
            | "active"
            | "pending_approval"
            | "payment_required"
            | "suspended"
            | "closed";
        billing?: BillingParty;
        billing_entity?: BusinessEntity;
        destination_billing_entity?: {};
        account_scope?: AccountScope;
        setup?: {
            url?: string;
            message: string;
            expires_at?: string;
            waiting_on?: PendingActionParty;
            kind?: PendingActionKind;
        };
        rate_card?: string;
        payment_terms?: PaymentTerms;
        credit_limit?: { amount: number; currency: string };
        errors?: Error[];
        warnings?: string[];
        sandbox?: boolean;
        notification_configs?: NotificationConfig[];
        reporting_delivery_configs?: ReportingDeliveryConfigurationState[];
        authorization?: AccountAuthorization;
    }[]

    Results for each account processed

    Type Declaration

    • Optionalaccount_id?: string

      Seller-assigned account identifier and the account's identity. A seller never issues an account_id it might later change. Sellers MUST return it on every non-failed provisioning result, except a pending_approval row that may still resolve to a different account: that row carries request_id (experimental, account.requests) and no account_id. Sellers MUST accept account_id as an AccountRef on every account-scoped task and MUST NOT change it for the life of the account. Buyers store it and send it on subsequent create_media_buy and other account-scoped operations.

    • Optionalrequest_id?: string

      Experimental (account.requests). Identifier of the seller's account request behind a pending_approval row. On a provisioning row, it stands in for the account_id the seller has not issued. On a settings-update row whose change the seller is reviewing, it names the request for that change, and a seller that supports account.requests MUST include it; the request resolves as updated or matched, or is rejected, as a request_account change request without allow_separate_account does. It never resolves as created; a seller that would accept the change only as a separate account rejects it with ACCOUNT_CHANGE_REQUIRES_NEW_ACCOUNT. Read it with list_accounts (request_ids) or wait for account_request.changed. It is not an account_id and is never accepted as an AccountRef.

      1

      128

    • Optionalresolution?: AccountRequestResolution
    • Optionalaccount?: AccountReference
    • Optionalbrand?: BrandReference
    • Optionaloperator?: string

      Current canonical operator domain. When an identity change is pending or rejected, this remains the current value rather than echoing the requested value.

    • Optionaloperator_unit?: OperatorUnit
    • Optionalrevision?: number

      Current account revision after this operation. Incremented by each persisted settings change, identity-change request, or identity-change disposition; not incremented by dry runs, validation failures, or exact idempotency replays. Pass this value in the next settings-update entry to prevent lost updates.

      1

      int

    • Optionalidentity_change?: AccountIdentityChange
    • Optionalidentity_change_preview?: AccountIdentityChangePreview
    • Optionalcurrency?: string

      Account currency, echoed when the advertiser object is currency-bound.

      ^[A-Z]{3}$

    • Optionaltimezone?: string

      Operational timezone for this account. AdCP 3.2 sellers echo it on created, updated, and unchanged results.

      1

    • Optionalname?: string

      Human-readable account name assigned by the seller

    • action: "created" | "updated" | "unchanged" | "failed"

      Action taken for this account. created: new account provisioned. updated: existing account modified. unchanged: no changes needed. failed: could not process (see errors).

    • Optionalstatus?:
          | "rejected"
          | "active"
          | "pending_approval"
          | "payment_required"
          | "suspended"
          | "closed"

      Account status. active: ready for use. pending_approval: seller reviewing (credit, legal); on a settings-update row, the seller is reviewing the entry's countries change, and the account keeps its current countries until the seller approves. rejected: seller declined the account request. payment_required: credit limit reached or funds depleted. suspended: was active, now paused. closed: was active, now terminated. Required for every non-failed action; omitted on failed results where the seller could not reach or resolve the account far enough to know a lifecycle state (see errors).

    • Optionalbilling?: BillingParty
    • Optionalbilling_entity?: BusinessEntity
    • Optionaldestination_billing_entity?: {}

      Request-only staging field. It MUST NOT appear in sync_accounts responses.

    • Optionalaccount_scope?: AccountScope
    • Optionalsetup?: {
          url?: string;
          message: string;
          expires_at?: string;
          waiting_on?: PendingActionParty;
          kind?: PendingActionKind;
      }

      Setup information for pending accounts. Provides the agent (or human) with next steps to complete account activation.

      • Optionalurl?: string

        URL where the human can complete the required action (credit application, legal agreement, add funds)

      • message: string

        Human-readable description of what's needed

      • Optionalexpires_at?: string

        When this setup link expires

        date-time

      • Optionalwaiting_on?: PendingActionParty
      • Optionalkind?: PendingActionKind
    • Optionalrate_card?: string

      Rate card applied to this account

    • Optionalpayment_terms?: PaymentTerms
    • Optionalcredit_limit?: { amount: number; currency: string }
      • amount: number

        0

      • currency: string

        ^[A-Z]{3}$

    • Optionalerrors?: Error[]

      Per-account errors. Required and non-empty when action is 'failed'; absent otherwise.

    • Optionalwarnings?: string[]

      Non-fatal warnings about this account

    • Optionalsandbox?: boolean

      Whether this is a sandbox account, echoed from the request. Only present for buyer-declared accounts.

    • Optionalnotification_configs?: NotificationConfig[]

      Applied notification subscribers for this account after declarative replacement and activation-proof checks. Present on created, updated, and unchanged results when the buyer included notification_configs in the request or any persisted entries exist on the account. Entries are keyed by account-scoped subscriber_id; re-sending an existing subscriber_id replaces that subscriber's config rather than creating a duplicate. Only configs that the seller has persisted are echoed. authentication.credentials is omitted on every entry (write-only).

      16

    • Optionalreporting_delivery_configs?: ReportingDeliveryConfigurationState[]

      Resolved caller-owned durable reporting delivery configurations after declarative replacement. Each item echoes desired state and reports validation/setup state plus the seller-issued destination_ref when resolved. A setup action may direct an authenticated user to complete a provider grant or Open Sharing activation, but MUST NOT carry credentials or a bearer URL.

      16

    • Optionalauthorization?: AccountAuthorization
    context?: ContextObject