Module adcp.types.generated_poc.account.sync_accounts_response

Classes

class Account (**data: Any)
Expand source code
class Account(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    account_id: Annotated[
        str | None,
        Field(
            description="Seller-assigned account identifier. When billing is 'agent', multiple brands may share the same account_id."
        ),
    ] = None
    action: Annotated[
        Action,
        Field(
            description='Action taken for this account. created: new account provisioned. updated: existing account modified. unchanged: no changes needed. failed: could not process (see errors).'
        ),
    ]
    billing: Annotated[
        Billing | None,
        Field(
            description="Who is invoiced on this account. May differ from the requested billing if the seller doesn't support it."
        ),
    ] = None
    brand_id: Annotated[
        str | None,
        Field(
            description='Brand ID within the house portfolio, echoed from request',
            pattern='^[a-z0-9_]+$',
        ),
    ] = None
    credit_limit: CreditLimit | None = None
    errors: Annotated[
        list[error.Error] | None,
        Field(description="Per-account errors (only present when action is 'failed')"),
    ] = None
    house: Annotated[
        str,
        Field(
            description='House domain, echoed from the request',
            pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
        ),
    ]
    name: Annotated[
        str | None, Field(description='Human-readable account name assigned by the seller')
    ] = None
    operator: Annotated[str | None, Field(description='Operator domain, echoed from request')] = (
        None
    )
    parent_account_id: Annotated[
        str | None,
        Field(
            description='Parent account ID when this account is a sub-account under a shared billing account'
        ),
    ] = None
    payment_terms: Annotated[
        str | None, Field(description="Payment terms (e.g., 'net_30', 'prepay')")
    ] = None
    rate_card: Annotated[str | None, Field(description='Rate card applied to this account')] = None
    setup: Annotated[
        Setup | None,
        Field(
            description='Setup information for pending accounts. Provides the agent (or human) with next steps to complete account activation.'
        ),
    ] = None
    status: Annotated[
        Status,
        Field(
            description='Account status. active: ready for use. pending_approval: seller reviewing (credit, legal). payment_required: credit limit reached or funds depleted. suspended: was active, now paused. closed: terminated.'
        ),
    ]
    warnings: Annotated[
        list[str] | None, Field(description='Non-fatal warnings about this account')
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var account_id : str | None
var actionAction
var billingBilling | None
var brand_id : str | None
var credit_limitCreditLimit | None
var errors : list[Error] | None
var house : str
var model_config
var name : str | None
var operator : str | None
var parent_account_id : str | None
var payment_terms : str | None
var rate_card : str | None
var setupSetup | None
var statusStatus
var warnings : list[str] | None

Inherited members

class Action (*args, **kwds)
Expand source code
class Action(Enum):
    created = 'created'
    updated = 'updated'
    unchanged = 'unchanged'
    failed = 'failed'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var created
var failed
var unchanged
var updated
class Billing (*args, **kwds)
Expand source code
class Billing(Enum):
    brand = 'brand'
    operator = 'operator'
    agent = 'agent'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var agent
var brand
var operator
class CreditLimit (**data: Any)
Expand source code
class CreditLimit(AdCPBaseModel):
    amount: Annotated[float, Field(ge=0.0)]
    currency: Annotated[str, Field(pattern='^[A-Z]{3}$')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var amount : float
var currency : str
var model_config

Inherited members

class Setup (**data: Any)
Expand source code
class Setup(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    expires_at: Annotated[
        AwareDatetime | None, Field(description='When this setup link expires')
    ] = None
    message: Annotated[str, Field(description="Human-readable description of what's needed")]
    url: Annotated[
        AnyUrl | None,
        Field(
            description='URL where the human can complete the required action (credit application, legal agreement, add funds)'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var expires_at : pydantic.types.AwareDatetime | None
var message : str
var model_config
var url : pydantic.networks.AnyUrl | None

Inherited members

class Status (*args, **kwds)
Expand source code
class Status(Enum):
    active = 'active'
    pending_approval = 'pending_approval'
    payment_required = 'payment_required'
    suspended = 'suspended'
    closed = 'closed'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var active
var closed
var payment_required
var pending_approval
var suspended
class SyncAccountsResponse (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class SyncAccountsResponse(RootModel[SyncAccountsResponse1 | SyncAccountsResponse2]):
    root: Annotated[
        SyncAccountsResponse1 | SyncAccountsResponse2,
        Field(
            description='Response from account sync operation. Returns per-account results with status and billing, or operation-level errors on complete failure.',
            examples=[
                {
                    'data': {
                        'accounts': [
                            {
                                'account_id': 'sub_tide_001',
                                'action': 'created',
                                'billing': 'agent',
                                'brand_id': 'tide',
                                'house': 'pg.com',
                                'name': 'Tide (via GroupM)',
                                'operator': 'groupm.com',
                                'parent_account_id': 'acc_agent_house',
                                'status': 'active',
                            },
                            {
                                'account_id': 'acc_dove_pending',
                                'action': 'created',
                                'billing': 'brand',
                                'brand_id': 'dove',
                                'house': 'unilever.com',
                                'name': 'Dove',
                                'operator': 'mindshare.com',
                                'setup': {
                                    'expires_at': '2026-03-10T00:00:00Z',
                                    'message': 'Credit application required for direct billing',
                                    'url': 'https://seller.com/onboard/dove',
                                },
                                'status': 'pending_approval',
                            },
                        ]
                    },
                    'description': 'Mixed results - one active, one pending approval',
                },
                {
                    'data': {
                        'accounts': [
                            {
                                'account_id': 'acc_agent_house',
                                'action': 'created',
                                'billing': 'agent',
                                'house': 'acme-corp.com',
                                'name': 'Acme Corp (via agent)',
                                'status': 'active',
                                'warnings': [
                                    'Direct billing (brand) not supported. Mapped to agent billing.'
                                ],
                            }
                        ]
                    },
                    'description': "Seller doesn't support direct billing, maps to agent billing",
                },
            ],
            title='Sync Accounts Response',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Union[SyncAccountsResponse1, SyncAccountsResponse2]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var rootSyncAccountsResponse1 | SyncAccountsResponse2
class SyncAccountsResponse1 (**data: Any)
Expand source code
class SyncAccountsResponse1(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    accounts: Annotated[list[Account], Field(description='Results for each account processed')]
    context: context_1.ContextObject | None = None
    dry_run: Annotated[
        bool | None, Field(description='Whether this was a dry run (no actual changes made)')
    ] = None
    ext: ext_1.ExtensionObject | None = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var accounts : list[Account]
var contextContextObject | None
var dry_run : bool | None
var extExtensionObject | None
var model_config

Inherited members

class SyncAccountsResponse2 (**data: Any)
Expand source code
class SyncAccountsResponse2(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    context: context_1.ContextObject | None = None
    errors: Annotated[
        list[error.Error],
        Field(
            description='Operation-level errors (e.g., authentication failure, service unavailable)',
            min_length=1,
        ),
    ]
    ext: ext_1.ExtensionObject | None = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var contextContextObject | None
var errors : list[Error]
var extExtensionObject | None
var model_config

Inherited members