@adcp/sdk API Reference - v14.0.0-beta.6
    Preparing search index...

    Interface SyncCatalogsSuccess

    Success response - sync operation processed catalogs (may include per-catalog failures)

    interface SyncCatalogsSuccess {
        status?: "completed";
        dry_run?: boolean;
        catalogs: {
            catalog_id: string;
            catalog_generation?: string;
            action: CatalogAction;
            platform_id?: string;
            item_count?: number;
            items_approved?: number;
            items_pending?: number;
            items_rejected?: number;
            item_issues?: {
                item_id: string;
                status: CatalogItemStatus;
                reasons?: string[];
            }[];
            last_synced_at?: string;
            next_fetch_at?: string;
            changes?: string[];
            errors?: Error[];
            warnings?: string[];
        }[];
        item_availability_updates?: {
            request_index: number;
            catalog_id: string;
            catalog_generation: string;
            item_id: string;
            action: "suppress"
            | "restore";
            status: "unchanged" | "failed" | "applied";
            availability?: "active" | "suppressed";
            overlay_revision?: number;
            expires_at?: string;
            applied_at?: string;
            errors?: [Error, ...Error[]];
            ext?: ExtensionObject;
        }[];
        item_availability_states?: {
            request_index: number;
            catalog_id: string;
            catalog_generation: string;
            item_id: string;
            status: "failed"
            | "found";
            availability?: "active" | "suppressed";
            overlay_revision?: number;
            expires_at?: string;
            updated_at?: string;
            errors?: [Error, ...Error[]];
            ext?: ExtensionObject;
        }[];
        sandbox?: boolean;
        context?: ContextObject;
        ext?: ExtensionObject;
    }
    Index

    Properties

    status?: "completed"

    Availability and synchronous catalog results are terminal and complete.

    dry_run?: boolean

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

    catalogs: {
        catalog_id: string;
        catalog_generation?: string;
        action: CatalogAction;
        platform_id?: string;
        item_count?: number;
        items_approved?: number;
        items_pending?: number;
        items_rejected?: number;
        item_issues?: {
            item_id: string;
            status: CatalogItemStatus;
            reasons?: string[];
        }[];
        last_synced_at?: string;
        next_fetch_at?: string;
        changes?: string[];
        errors?: Error[];
        warnings?: string[];
    }[]

    Results for each catalog processed. Items with action='failed' indicate per-catalog validation/processing failures, not operation-level failures.

    Type Declaration

    • catalog_id: string

      Catalog ID from the request

    • Optionalcatalog_generation?: string

      Opaque token for this catalog incarnation. Sellers declaring catalog_item_availability_updates MUST return it for every accessible buyer-managed catalog result, including discovery. It remains stable across ordinary upserts and feed refreshes, changes after deletion and recreation, and is never reused for the same resolved account and catalog_id.

      1

      255

    • action: CatalogAction
    • Optionalplatform_id?: string

      Platform-specific ID assigned to the catalog

    • Optionalitem_count?: number

      Total number of items in the catalog after sync. Required when action is 'created', 'updated', or 'unchanged'. Omitted on 'failed' and 'deleted'.

      0

    • Optionalitems_approved?: number

      Number of items approved by the platform. Populated when the platform performs item-level review.

      0

    • Optionalitems_pending?: number

      Number of items pending platform review. Common for product catalogs where items must pass content policy checks.

      0

    • Optionalitems_rejected?: number

      Number of items rejected by the platform. Check item_issues for rejection reasons.

      0

    • Optionalitem_issues?: { item_id: string; status: CatalogItemStatus; reasons?: string[] }[]

      Per-item issues reported by the platform (rejections, warnings). Only present when the platform performs item-level review.

    • Optionallast_synced_at?: string

      ISO 8601 timestamp of when the most recent sync was accepted by the platform

      date-time

    • Optionalnext_fetch_at?: string

      ISO 8601 timestamp of when the platform will next fetch the feed URL. Only present for URL-based catalogs with update_frequency.

      date-time

    • Optionalchanges?: string[]

      Field names that were modified (only present when action='updated')

    • Optionalerrors?: Error[]

      Validation or processing errors (only present when action='failed')

    • Optionalwarnings?: string[]

      Non-fatal warnings about this catalog

    item_availability_updates?: {
        request_index: number;
        catalog_id: string;
        catalog_generation: string;
        item_id: string;
        action: "suppress" | "restore";
        status: "unchanged" | "failed" | "applied";
        availability?: "active" | "suppressed";
        overlay_revision?: number;
        expires_at?: string;
        applied_at?: string;
        errors?: [Error, ...Error[]];
        ext?: ExtensionObject;
    }[]

    Acknowledgements for item_availability_updates. The array length MUST equal the request array length; entry N MUST have request_index N, occupy position N, and exactly echo catalog_id, catalog_generation, item_id, and action from request entry N. Buyers MUST reject the response as non-conformant if count, ordering, request_index, or echoed identity differs. Lenient-mode failures stay in their request positions. In strict mode, any per-entry failure instead produces the operation-level error branch before mutation and this array is absent.

    Type Declaration

    • request_index: number

      Zero-based index of the corresponding item_availability_updates entry.

    • catalog_id: string

      Catalog ID from the request.

    • catalog_generation: string

      Catalog generation from the request.

    • item_id: string

      Item ID from the request.

    • action: "suppress" | "restore"

      Action from the request.

    • status: "unchanged" | "failed" | "applied"

      applied means the requested overlay transition completed, including replacement or removal of an existing expires_at; unchanged means the item was already in the requested buyer-availability state with the same expiry; failed means no transition was applied.

    • Optionalavailability?: "active" | "suppressed"

      Persisted buyer-authored state after an applied or unchanged result.

    • Optionaloverlay_revision?: number

      Persisted state revision after an applied or unchanged result. Applied increments the request's expected_overlay_revision exactly once; unchanged preserves it.

    • Optionalexpires_at?: string

      Persisted expiry after this update, present only for a suppressed state with an expiry.

    • Optionalapplied_at?: string

      Seller timestamp when the buyer-availability state took effect. Required for applied. Optional for unchanged when the seller knows the timestamp of the already-persisted state.

    • Optionalerrors?: [Error, ...Error[]]

      Why this item update failed. Required when status is failed.

      1

    • Optionalext?: ExtensionObject
    item_availability_states?: {
        request_index: number;
        catalog_id: string;
        catalog_generation: string;
        item_id: string;
        status: "failed" | "found";
        availability?: "active" | "suppressed";
        overlay_revision?: number;
        expires_at?: string;
        updated_at?: string;
        errors?: [Error, ...Error[]];
        ext?: ExtensionObject;
    }[]

    Current-state results for item_availability_queries, evaluated after updates in a mixed request. The array length MUST equal the request query length; entry N MUST have request_index N, occupy position N, and exactly echo catalog_id, catalog_generation, and item_id. Buyers MUST reject any mismatch. A replayed response is historical; use a fresh query idempotency_key before treating it as current after time-dependent expiry or catalog deletion/recreation.

    Type Declaration

    • request_index: number

      Zero-based index of the corresponding item_availability_queries entry.

    • catalog_id: string
    • catalog_generation: string
    • item_id: string
    • status: "failed" | "found"

      found returns current state; failed means the reference could not be read.

    • Optionalavailability?: "active" | "suppressed"

      Current buyer-authored overlay state. active does not imply seller approval or delivery eligibility.

    • Optionaloverlay_revision?: number

      Current optimistic-concurrency token. Revision 0 is the initial active state. Every applied suppress, applied restore, and automatic expiry increments it exactly once; unchanged updates, reads, and idempotent replays do not increment it.

    • Optionalexpires_at?: string

      Current automatic expiry, present only while availability is suppressed with an expiry.

    • Optionalupdated_at?: string

      Seller timestamp of the state represented by overlay_revision.

    • Optionalerrors?: [Error, ...Error[]]

      1

    • Optionalext?: ExtensionObject
    sandbox?: boolean

    When true, this response contains simulated data from sandbox mode.

    context?: ContextObject