API Models

Complete reference for all API request and response models.

Overview

All API responses are validated using Pydantic models to ensure data consistency and type safety. The models are organized by their API tags and provide:

  • Field validation and type checking

  • Automatic JSON serialization/deserialization

  • Clear documentation of expected data structures

  • Support for nested models and relationships

Model Categories

Core Models

Supporting Models

Usage Example

When you call an API endpoint, the response is automatically validated against the corresponding Pydantic model:

from ABConnect import ABConnectAPI
from ABConnect.api.models.jobs import Job

api = ABConnectAPI()

# Get a job - response is validated as a Job model
job = api.jobs.get("2000000")

# Access typed fields
print(job.jobDisplayId)  # "2000000"
print(job.customerContact.contact.fullName)  # "Training"

# Models provide IDE autocomplete and type hints
for item in job.items:
    print(f"{item.description}: {item.weight} lbs")

Cross-References

Throughout the API documentation, you’ll see references to these models in the Response Type sections. Click on any model reference to see its complete field documentation.