> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bbrands.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ServiceProviderSyncUnit

> The schema definition for the ServiceProviderSyncUnit resource.

## Primary key

[Navigate to header](#param-commercial-activity)

document\_id

uuid

default:"Random UUID"

public

required

Unique identifier of the service provider sync unit.

## Specific attributes

[Navigate to header](#param-commercial-activity)

attempts

integer

default:"0"

public

required

The attempts of the service provider sync unit.

[Navigate to header](#param-commercial-activity)

completion\_reason

varchar

public

The completion reason of the service provider sync unit.

**Rules**: Possible values: cap\_reached, error, exhausted, not\_found. Max length: 30 characters

[Navigate to header](#param-commercial-activity)

cursor

varchar

public

The cursor of the service provider sync unit.

**Rules**: Max length: 250 characters

[Navigate to header](#param-commercial-activity)

discarded\_at

timestamp

public

Timestamp when the operator discarded the client whose reading failed (a failed ingest unit) while the batch was in review; a discarded client is never retried.

**Rules**: Precision: 6, with timezone

[Navigate to header](#param-commercial-activity)

discarded\_by

uuid

public

User who discarded the client whose reading failed.

[Navigate to header](#param-commercial-activity)

discard\_note

text

public

Optional note the operator left when discarding the client.

[Navigate to header](#param-commercial-activity)

items\_fetched

integer

default:"0"

public

required

The items fetched of the service provider sync unit.

[Navigate to header](#param-commercial-activity)

pages\_fetched

integer

default:"0"

public

required

The pages fetched of the service provider sync unit.

[Navigate to header](#param-commercial-activity)

provider\_total

integer

public

The provider total of the service provider sync unit.

[Navigate to header](#param-commercial-activity)

reason\_code

varchar

public

The reason code of the service provider sync unit.

**Rules**: Max length: 100 characters

[Navigate to header](#param-commercial-activity)

status

varchar

default:"pending"

public

required

The status of the service provider sync unit.

**Rules**: Possible values: completed, failed, not\_found, pending, processing, skipped. Max length: 20 characters

[Navigate to header](#param-commercial-activity)

subject\_key

varchar

public

required

The subject key of the service provider sync unit.

**Rules**: Max length: 250 characters

[Navigate to header](#param-commercial-activity)

subject\_kind

varchar

public

required

The subject kind of the service provider sync unit.

**Rules**: Possible values: account, document\_key, period, provider\_customer, tax\_identifier. Max length: 30 characters

[Navigate to header](#param-commercial-activity)

subject\_variants\_tried

PgArray

public

required

The subject variants tried of the service provider sync unit.

## Foreign keys

[Navigate to header](#param-commercial-activity)

account

uuid

public

Optional reference to the Account associated with the service provider sync unit. [Ref: Account Schema](https://docs.bbrands.io/schemas/account/account.md)

[Navigate to header](#param-commercial-activity)

queue\_event

uuid

public

Optional reference to the Queue Event associated with the service provider sync unit. [Ref: Queue Event Schema](https://docs.bbrands.io/schemas/queue/queue-event.md)

[Navigate to header](#param-commercial-activity)

service\_provider\_connection

uuid

public

Optional reference to the Service Provider Sync Run associated with the service provider sync unit. [Ref: Service Provider Sync Run Schema](https://docs.bbrands.io/schemas/integration/service-provider-sync-run.md)

[Navigate to header](#param-commercial-activity)

service\_provider\_sync\_run

uuid

public

required

Reference to the Service Provider Sync Run this service provider sync unit belongs to. [Ref: Service Provider Sync Run Schema](https://docs.bbrands.io/schemas/integration/service-provider-sync-run.md)

## Tracking attributes

[Navigate to header](#param-commercial-activity)

created\_at

timestamp

public

required

Timestamp when the record was created.

**Rules**: Precision: 6, with timezone

[Navigate to header](#param-commercial-activity)

deleted\_at

timestamp

public

Timestamp when the record was soft-deleted, when applicable.

**Rules**: Precision: 6, with timezone

[Navigate to header](#param-commercial-activity)

is\_actived

boolean

default:"true"

public

required

Indicates whether the record is currently active.

[Navigate to header](#param-commercial-activity)

is\_deleted

boolean

default:"false"

public

required

Indicates whether the record has been soft-deleted.

[Navigate to header](#param-commercial-activity)

updated\_at

timestamp

public

Timestamp when the record was last updated.

**Rules**: Precision: 6, with timezone


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.