openapi: 3.1.0 info: title: ServiceTitan Accounting Adjustments Customers API description: 'The Accounting API manages invoices, invoice items, AP credits, payments, payment terms, payment types, journal entries, journal entry details, tax zones, and GL accounts. Tenant-scoped; OAuth 2.0 + App Key. Integrates with QuickBooks, Sage Intacct, and Acumatica. ' version: 2.0.0 contact: name: ServiceTitan Developer Support url: https://developer.servicetitan.io/ email: integrations@servicetitan.com license: name: ServiceTitan Terms of Service url: https://www.servicetitan.com/legal/terms-of-service servers: - url: https://api.servicetitan.io/accounting/v2/{tenant} description: Production variables: tenant: default: '0000000' - url: https://api-integration.servicetitan.io/accounting/v2/{tenant} description: Integration (Sandbox) variables: tenant: default: '0000000' security: - OAuth2: [] AppKey: [] tags: - name: Customers description: Customer-of-record records paths: /customers: get: summary: List Customers description: Returns a paginated list of customers matching the provided filters. operationId: listCustomers tags: - Customers parameters: - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/IncludeTotal' - $ref: '#/components/parameters/Ids' - $ref: '#/components/parameters/ModifiedBefore' - $ref: '#/components/parameters/ModifiedOnOrAfter' - $ref: '#/components/parameters/CreatedBefore' - $ref: '#/components/parameters/CreatedOnOrAfter' responses: '200': description: Paginated list of customers content: application/json: schema: $ref: '#/components/schemas/CustomerPagedResponse' post: summary: Create Customer description: Creates a new customer record in the tenant. operationId: createCustomer tags: - Customers requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomerCreateRequest' responses: '200': description: Created customer content: application/json: schema: $ref: '#/components/schemas/Customer' /customers/{id}: get: summary: Get Customer operationId: getCustomer tags: - Customers parameters: - $ref: '#/components/parameters/Id' responses: '200': description: Customer record content: application/json: schema: $ref: '#/components/schemas/Customer' patch: summary: Update Customer operationId: updateCustomer tags: - Customers parameters: - $ref: '#/components/parameters/Id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomerUpdateRequest' responses: '200': description: Updated customer content: application/json: schema: $ref: '#/components/schemas/Customer' components: parameters: CreatedBefore: name: createdBefore in: query schema: type: string format: date-time Id: name: id in: path required: true schema: type: integer format: int64 ModifiedBefore: name: modifiedBefore in: query schema: type: string format: date-time Ids: name: ids in: query schema: type: string description: Comma-separated list of IDs IncludeTotal: name: includeTotal in: query schema: type: boolean PageSize: name: pageSize in: query schema: type: integer default: 50 maximum: 500 Page: name: page in: query schema: type: integer default: 1 minimum: 1 CreatedOnOrAfter: name: createdOnOrAfter in: query schema: type: string format: date-time ModifiedOnOrAfter: name: modifiedOnOrAfter in: query schema: type: string format: date-time schemas: Address: type: object properties: street: type: string unit: type: string nullable: true city: type: string state: type: string zip: type: string country: type: string latitude: type: number nullable: true longitude: type: number nullable: true CustomerPagedResponse: type: object properties: page: type: integer pageSize: type: integer hasMore: type: boolean totalCount: type: integer nullable: true data: type: array items: $ref: '#/components/schemas/Customer' LocationCreateRequest: type: object required: - address properties: name: type: string address: $ref: '#/components/schemas/Address' zoneId: type: integer CustomerCreateRequest: type: object required: - name - type - locations properties: name: type: string type: type: string enum: - Residential - Commercial doNotMail: type: boolean doNotService: type: boolean locations: type: array items: $ref: '#/components/schemas/LocationCreateRequest' contacts: type: array items: $ref: '#/components/schemas/ContactCreateRequest' customFields: type: array items: $ref: '#/components/schemas/CustomField' Customer: type: object properties: id: type: integer format: int64 active: type: boolean name: type: string type: type: string enum: - Residential - Commercial address: $ref: '#/components/schemas/Address' customFields: type: array items: $ref: '#/components/schemas/CustomField' balance: type: number format: double doNotMail: type: boolean doNotService: type: boolean createdOn: type: string format: date-time modifiedOn: type: string format: date-time memberships: type: array items: type: object contacts: type: array items: $ref: '#/components/schemas/Contact' hasActiveMembership: type: boolean ContactCreateRequest: type: object required: - type - value properties: type: type: string value: type: string memo: type: string Contact: type: object properties: id: type: integer format: int64 type: type: string enum: - Phone - MobilePhone - Email - Fax value: type: string memo: type: string nullable: true modifiedOn: type: string format: date-time CustomerUpdateRequest: type: object properties: name: type: string type: type: string doNotMail: type: boolean doNotService: type: boolean customFields: type: array items: $ref: '#/components/schemas/CustomField' CustomField: type: object properties: typeId: type: integer name: type: string value: type: string securitySchemes: OAuth2: type: oauth2 flows: clientCredentials: tokenUrl: https://auth.servicetitan.io/connect/token scopes: {} AppKey: type: apiKey in: header name: ST-App-Key