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

# Creating Transactions

> Interactive playground for creating transactions and retrieving transaction records

# Creating Transactions

## Overview

Transactions represent completed sales in Kintsugi. Each transaction records a sale with customer information, line items, addresses, and tax details. Transactions are used for compliance tracking, nexus determination, and tax filing preparation.

<Warning>
  Only create transactions for **completed sales** with confirmed payment. Do not sync pending orders or estimates.
</Warning>

## When to Create Transactions

* **After payment confirmation**: When a sale is completed and payment is received
* **Order fulfillment**: When an order is shipped or delivered
* **Invoice creation**: When generating invoices for completed sales
* **Batch sync**: Daily or periodic syncing of completed orders

## Workflow

1. **Create a Transaction** - Record a completed sale
2. **Retrieve Transactions** - Search and retrieve transaction records

## Step 1: Create a Transaction

Create a transaction using the interactive playground below with `POST /v1/transactions`.

### Required Fields

* `external_id`: Your internal transaction/order identifier (must be unique)
* `date`: Transaction date and time (UTC)
* `currency`: Currency code (e.g., USD, EUR)
* `total_amount`: Total transaction amount
* `source`: Source of the transaction (e.g., "API", "SHOPIFY")
* `status`: Transaction status (use "COMMITTED" for completed sales)
* `type`: Transaction type (typically "SALE")
* `transaction_items`: Array of line items
* `addresses`: Array of addresses (at minimum: SHIP\_TO or BILL\_TO)

### Example Request

```json theme={null}
{
  "external_id": "ORDER-12345",
  "date": "2024-01-15T10:00:00Z",
  "currency": "USD",
  "total_amount": 150.00,
  "source": "API",
  "status": "COMMITTED",
  "type": "SALE",
  "transaction_items": [
    {
      "external_id": "ITEM-001",
      "external_product_id": "PROD-001",
      "product": "Example Product",
      "quantity": "1.0",
      "amount": 100.00
    }
  ],
  "addresses": [
    {
      "type": "SHIP_TO",
      "street_1": "123 Main St",
      "city": "Seattle",
      "state": "WA",
      "postal_code": "98101",
      "country": "US"
    }
  ]
}
```

## Step 2: Retrieve Transactions

After creating transactions, retrieve them using `GET /v1/transactions`. You can:

* Filter by `external_id` using the `search_query` parameter
* Filter by date range using `date__gte` and `date__lte`
* Filter by status, state, country, and more
* Paginate through results

## Authentication

This endpoint requires two headers:

* `x-api-key`: Your API key
* `x-organization-id`: Your organization ID

<Note>
  Both headers are required for authentication. You can find your API key and organization ID in your [Kintsugi dashboard](https://app.trykintsugi.com).
</Note>

## Try It Out

Use the interactive playground below to create a transaction. The playground will automatically include the required authentication headers.

<Info>
  The playground prefills example values from the API schema. Modify the request body to test different transaction configurations.
</Info>

## Common Use Cases

### Basic Transaction

Create a simple transaction with minimal required fields:

```json theme={null}
{
  "external_id": "ORDER-001",
  "date": "2024-01-15T10:00:00Z",
  "currency": "USD",
  "total_amount": 100.00,
  "source": "API",
  "status": "COMMITTED",
  "type": "SALE",
  "transaction_items": [
    {
      "external_id": "ITEM-001",
      "external_product_id": "PROD-001",
      "product": "Widget",
      "quantity": "1.0",
      "amount": 100.00
    }
  ],
  "addresses": [
    {
      "type": "SHIP_TO",
      "street_1": "123 Main St",
      "city": "Seattle",
      "state": "WA",
      "postal_code": "98101",
      "country": "US"
    }
  ]
}
```

### Transaction with Customer

Include customer information:

```json theme={null}
{
  "external_id": "ORDER-002",
  "date": "2024-01-15T10:00:00Z",
  "currency": "USD",
  "total_amount": 200.00,
  "source": "API",
  "status": "COMMITTED",
  "type": "SALE",
  "customer": {
    "external_id": "CUST-001",
    "name": "John Doe",
    "email": "john@example.com",
    "street_1": "123 Main St",
    "city": "Seattle",
    "state": "WA",
    "postal_code": "98101",
    "country": "US"
  },
  "transaction_items": [
    {
      "external_id": "ITEM-001",
      "external_product_id": "PROD-001",
      "product": "Product A",
      "quantity": "2.0",
      "amount": 200.00
    }
  ],
  "addresses": [
    {
      "type": "SHIP_TO",
      "street_1": "123 Main St",
      "city": "Seattle",
      "state": "WA",
      "postal_code": "98101",
      "country": "US"
    }
  ]
}
```

## Response Fields

The API returns detailed transaction information:

* `id`: Kintsugi's unique transaction identifier
* `external_id`: Your transaction identifier
* `date`: Transaction date
* `total_amount`: Total transaction amount
* `total_tax_amount_calculated`: Calculated tax amount
* `status`: Transaction status
* `addresses`: Array of addresses
* `transaction_items`: Array of line items
* `customer`: Customer information (if provided)

## Next Steps

* [Get Transactions](/reference/api/transactions/get-transactions) - List and search transactions
* [Get Transaction By ID](/reference/api/transactions/get-transaction-by-id) - Retrieve specific transaction
* [Update Transaction](/reference/api/transactions/update-transaction) - Modify transaction details
* [Syncing Transaction Records](/docs/api-guides/syncing-transaction-records) - Learn more about transaction management

## Related Resources

* [Transactions API Reference](/reference/api/transactions/create-transaction)
* [Getting Started](/docs/getting-started)
* [Support](https://trykintsugi.com/support)


## OpenAPI

````yaml post /v1/transactions
openapi: 3.0.0
info:
  title: Tax Platform
  version: 1.0.0
servers:
  - url: https://api.trykintsugi.com
    description: Production API server URL
security: []
paths:
  /v1/transactions:
    post:
      tags:
        - Transactions
      summary: Create Transaction
      description: Create a transaction.
      operationId: create_transaction_v1_transactions_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionPublicRequest'
            example:
              organization_id: orgn_YourOrgIdHere
              external_id: YourUniqueOrder123
              date: '2024-01-15T14:30:00Z'
              type: SALE
              currency: USD
              customer:
                organization_id: orgn_YourOrgIdHere
                external_id: Cust456
                name: John Doe
              addresses:
                - type: SHIP_TO
                  country: US
                  state: CA
                  city: San Francisco
                  postal_code: '94107'
                  street_1: 123 Main St
              transaction_items:
                - organization_id: orgn_YourOrgIdHere
                  date: '2024-01-15T14:30:00Z'
                  external_product_id: SKU-ABC
                  product: Example Widget
                  quantity: 2
                  amount: 50
              source: API
      responses:
        '202':
          description: Successfully created transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionRead'
                type: array
                items:
                  $ref: '#/components/schemas/TransactionRead'
                title: Response 202 Create Transaction V1 Transactions Post
              example:
                - organization_id: orgn_YOURORGID
                  external_id: tran_YOURTRANSACTIONID
                  date: '2024-01-15T14:30:00'
                  status: COMMITTED
                  description: Order with one taxable book and one exempt service
                  processing_status: QUEUED
                  total_amount: '200.00'
                  customer_id: cust_afXm2qPEycF83
                  marketplace: false
                  exempt: FULLY_EXEMPT
                  exemptions:
                    - updated_at: '2025-05-22T14:48:46.056060'
                      start_date: '2025-01-23'
                      transaction_id: tran_nc5Q4hLi97NRD
                      reseller: true
                      status: ACTIVE
                      created_at: '2025-05-22T14:48:46.193109'
                      exemption_type: transaction
                      customer_id: cust_afXm2qPEycF83
                      id: exmp_xfLpDHxxX4Cxv
                      organization_id: orgn_UT7zEcgwt4Fhk
                  total_tax_amount_imported: '6.00'
                  tax_rate_imported: '0.030000000'
                  total_tax_amount_calculated: '0.00'
                  tax_rate_calculated: '0E-9'
                  total_tax_liability_amount: '6.00'
                  tax_liability_source: COLLECTED
                  taxable_amount: '200.00'
                  currency: USD
                  locked: false
                  source: API
                  address_status: UNVERIFIED
                  id: tran_g9WJFTdFjLzDv
                  addresses:
                    - street_1: 123 Main St
                      city: San Francisco
                      state: CA
                      postal_code: '94107'
                      country: US
                      type: SHIP_TO
                      status: UNVERIFIED
                      id: addr_tWqfSwDZK7aSt
                      transaction_id: tran_g9WJFTdFjLzDv
                  transaction_items:
                    - external_id: LI_BOOK_TAXABLE_001
                      organization_id: orgn_YOURORGID
                      date: '2025-01-24T11:00:00'
                      external_product_id: PROD_BOOK_SCIFI_HC
                      product: Sci-Fi Hardcover Novel
                      product_id: prod_AKczKRGnAe3d3
                      quantity: '1'
                      amount: '100.00'
                      tax_amount_imported: '6.00'
                      tax_rate_imported: '0.060000000'
                      tax_amount_calculated: '0.00'
                      tax_rate_calculated: '0E-9'
                      taxable_amount: '100.00'
                      exempt: false
                      id: txim_c63o27oiEhLuA
                      tax_items:
                        - rule_id: '0000'
                          rate: '0.060000000'
                          amount: '6.00'
                          name: PA State Sales Tax
                          type: IMPORTED
                          jurisdiction_type: STATE
                          jurisdiction_name: PA
                      total_discount: '0.00'
                      subtotal: '100.00'
                    - external_id: LI_SERVICE_EXEMPT_002
                      organization_id: orgn_YOURORGID
                      date: '2025-01-24T11:00:00'
                      external_product_id: PROD_DIGITAL_SERVICE_EX
                      product: Digital Marketing Service (Non-Taxable in PA)
                      product_id: prod_zz2RshS8uweRe
                      quantity: '1'
                      amount: '100.00'
                      tax_amount_imported: '0.00'
                      tax_rate_imported: '0E-9'
                      tax_amount_calculated: '0.00'
                      tax_rate_calculated: '0E-9'
                      taxable_amount: '100.00'
                      tax_exemption: PRODUCT
                      exempt: false
                      id: txim_eqwAKmiDpgf2m
                      tax_items: []
                      total_discount: '0.00'
                      subtotal: '100.00'
                  customer:
                    name: John Doe
                    external_id: Cust456
                    status: ACTIVE
                    email: buyer@example.com
                    address_status: UNVERIFIED
                    id: cust_afXm2qPEycF83
                    organization_id: orgn_YOURORGID
                  type: SALE
                  total_discount: '0.00'
                  subtotal: '200.00'
        '400':
          description: Bad Request - Invalid input or business rule violation
          content:
            application/json:
              examples:
                duplicate_external_id:
                  summary: Duplicate transaction external ID
                  value:
                    detail: >-
                      Duplicate external id (ORDER_XYZ_789) for the given
                      transaction not allowed.
                missing_product_external_id:
                  summary: Missing product external ID
                  value:
                    detail: '[orgn_YourOrgIdHere] Product does not have an external id'
                connection_mismatch:
                  summary: Connection mismatch error
                  value:
                    detail: Connection mismatch between transaction and customer
                invalid_address:
                  summary: Invalid address error
                  value:
                    detail: 'Address validation failed: missing required fields'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Authentication failed
          content:
            application/json:
              examples:
                missing_api_key:
                  summary: Missing API key
                  value:
                    detail: The request is missing a valid x-api-key.
                invalid_token:
                  summary: Invalid or expired token
                  value:
                    detail: Not authenticated
                organization_access:
                  summary: No access to organization
                  value:
                    detail: User does not have access to the specified organization
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error - Request data failed validation
          content:
            application/json:
              examples:
                missing_org_id:
                  summary: Missing organization ID
                  value:
                    detail:
                      - type: missing
                        loc:
                          - header
                          - x-organization-id
                        msg: Field required
                missing_required_field:
                  summary: Missing required field
                  value:
                    detail:
                      - type: missing
                        loc:
                          - body
                          - external_id
                        msg: Field required
                invalid_enum_value:
                  summary: Invalid enum value
                  value:
                    detail:
                      - type: enum
                        loc:
                          - body
                          - currency
                        msg: Input should be 'USD', 'CAD', 'EUR'...
                        input: INVALID
                        ctx:
                          expected: one of USD, CAD, EUR...
                invalid_date_format:
                  summary: Invalid date format
                  value:
                    detail:
                      - type: datetime_parsing
                        loc:
                          - body
                          - date
                        msg: Input should be a valid datetime, invalid format
                        input: '2023-13-45'
              schema:
                $ref: >-
                  #/components/schemas/backend__src__transactions__responses__ValidationErrorResponse
        '500':
          description: Internal server error
          content:
            application/json:
              examples:
                generic_error:
                  summary: Generic server error
                  value:
                    detail: An unexpected error occurred
                database_error:
                  summary: Database error
                  value:
                    detail: 'Database operation failed: DatabaseError'
                external_service_error:
                  summary: External service error
                  value:
                    detail: >-
                      An error occurred while making a request to an external
                      service: ExternalServiceError
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - APIKeyHeader: []
          CustomHeader: []
components:
  schemas:
    TransactionPublicRequest:
      properties:
        requires_exemption:
          $ref: '#/components/schemas/ExemptionRequired'
          description: Indicates if transaction requires tax exemption.
        organization_id:
          type: string
          title: Organization Id
          description: >-
            Unique identifier of the organization. This field is deprecated, and
            should no longer be used. The value is populated through the
            'x-organization-id' header.
          deprecated: true
        external_id:
          type: string
          minLength: 1
          title: External Id
          description: External identifier of the transaction.
        date:
          type: string
          format: date-time
          title: Date
          description: Transaction date and time
        shop_date:
          description: Transaction date in the shop's local timezone
          type: string
        shop_date_tz:
          description: Timezone of the shop
          type: string
        description:
          description: Description of the transaction.
          type: string
        refund_status:
          $ref: '#/components/schemas/TransactionRefundStatus'
          description: Status of refund, if applicable
        total_amount:
          description: Total amount of the transaction.
          default: '0.00'
          type: number
        customer_id:
          description: Unique identifier of the customer.
          type: string
        marketplace:
          description: Indicates if transaction is marketplace-based.
          default: false
          type: boolean
        exempt:
          $ref: '#/components/schemas/TransactionExemptStatusEnum'
          description: Exemption status (e.g., NOT_EXEMPT)
          default: NOT_EXEMPT
        exemptions:
          description: List of exemptions applied (if any).
          type: array
          items:
            $ref: '#/components/schemas/Exemption'
        related_to:
          description: Related transaction identifier.
          type: string
        secondary_external_id:
          description: Secondary External Identifier.
          type: string
        secondary_source:
          description: Secondary source information
          type: string
        external_friendly_id:
          description: Friendly identifier of the original item.
          type: string
        total_tax_amount_imported:
          description: Imported tax amount.
          default: '0.00'
          type: number
        tax_rate_imported:
          description: Imported tax rate.
          default: '0.00'
          type: number
        total_tax_amount_calculated:
          description: Calculated tax amount.
          default: '0.00'
          type: number
        tax_rate_calculated:
          description: Calculated tax rate.
          default: '0.00'
          type: number
        total_tax_liability_amount:
          description: Total tax liability amount.
          default: '0.00'
          type: number
        tax_liability_source:
          $ref: '#/components/schemas/TaxLiabilitySourceEnum'
          description: Source of tax liability.
        taxable_amount:
          description: Taxable amount.
          default: '0.00'
          type: number
        currency:
          $ref: '#/components/schemas/CurrencyEnum'
          description: Currency code (ISO 4217, e.g., USD)
          default: USD
        locked:
          type: boolean
          title: Locked
          description: Transaction lock status.
          default: false
        source:
          $ref: '#/components/schemas/SourceEnum'
          description: Source platform (e.g., STRIPE)
          default: OTHER
        connection_id:
          description: Connection Identifier
          type: string
        filing_id:
          description: Filing identifier.
          type: string
        city:
          description: City of the transaction address.
          type: string
        county:
          description: County of the transaction address.
          type: string
        state:
          description: State of the transaction address.
          type: string
        country:
          $ref: '#/components/schemas/CountryCodeEnum'
          description: Country code (ISO Alpha-2).
        postal_code:
          description: Postal code of the transaction.
          type: string
        tax_id:
          description: >-
            Tax ID associated with the transaction. DEPRECATED: This field is
            only populated for QuickBooks integrations and will be removed in a
            future version.
          deprecated: true
          type: string
        status:
          $ref: '#/components/schemas/TransactionStatusEnum'
          description: Transaction status (e.g., COMMITTED)
          default: COMMITTED
        addresses:
          items:
            $ref: '#/components/schemas/TransactionAddressPublic'
          type: array
          title: Addresses
        transaction_items:
          items:
            $ref: '#/components/schemas/TransactionItemBuilder'
          type: array
          title: Transaction Items
        customer:
          $ref: '#/components/schemas/CustomerBaseBase'
          title: Customer
        type:
          $ref: '#/components/schemas/TransactionTypeEnum'
      type: object
      required:
        - organization_id
        - external_id
        - date
        - addresses
        - transaction_items
        - customer
        - type
      title: TransactionPublicRequest
    TransactionRead:
      properties:
        requires_exemption:
          $ref: '#/components/schemas/ExemptionRequired'
          description: Indicates if transaction requires tax exemption.
        organization_id:
          type: string
          title: Organization Id
          description: >-
            Unique identifier of the organization. This field is deprecated, and
            should no longer be used. The value is populated through the
            'x-organization-id' header.
          deprecated: true
        external_id:
          type: string
          minLength: 1
          title: External Id
          description: External identifier of the transaction.
        date:
          type: string
          format: date-time
          title: Date
          description: Transaction date and time
        shop_date:
          description: Transaction date in the shop's local timezone
          type: string
        shop_date_tz:
          description: Timezone of the shop
          type: string
        description:
          description: Description of the transaction.
          type: string
        refund_status:
          $ref: '#/components/schemas/TransactionRefundStatus'
          description: Status of refund, if applicable
        total_amount:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,10}|(?=[\d.]{1,13}0*$)\d{0,10}\.\d{0,2}0*$)
          title: Total Amount
          description: Total amount of the transaction.
          default: '0.00'
        customer_id:
          description: Unique identifier of the customer.
          type: string
        marketplace:
          description: Indicates if transaction is marketplace-based.
          default: false
          type: boolean
        exempt:
          $ref: '#/components/schemas/TransactionExemptStatusEnum'
          description: Exemption status (e.g., NOT_EXEMPT)
          default: NOT_EXEMPT
        exemptions:
          description: List of exemptions applied (if any).
          type: array
          items:
            $ref: '#/components/schemas/Exemption'
        related_to:
          description: Related transaction identifier.
          type: string
        secondary_external_id:
          description: Secondary External Identifier.
          type: string
        secondary_source:
          description: Secondary source information
          type: string
        external_friendly_id:
          description: Friendly identifier of the original item.
          type: string
        total_tax_amount_imported:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,10}|(?=[\d.]{1,13}0*$)\d{0,10}\.\d{0,2}0*$)
          title: Total Tax Amount Imported
          description: Imported tax amount.
          default: '0.00'
        tax_rate_imported:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,3}|(?=[\d.]{1,13}0*$)\d{0,3}\.\d{0,9}0*$)
          title: Tax Rate Imported
          description: Imported tax rate.
          default: '0.00'
        total_tax_amount_calculated:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,10}|(?=[\d.]{1,13}0*$)\d{0,10}\.\d{0,2}0*$)
          title: Total Tax Amount Calculated
          description: Calculated tax amount.
          default: '0.00'
        tax_rate_calculated:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,3}|(?=[\d.]{1,13}0*$)\d{0,3}\.\d{0,9}0*$)
          title: Tax Rate Calculated
          description: Calculated tax rate.
          default: '0.00'
        total_tax_liability_amount:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,10}|(?=[\d.]{1,13}0*$)\d{0,10}\.\d{0,2}0*$)
          title: Total Tax Liability Amount
          description: Total tax liability amount.
          default: '0.00'
        tax_liability_source:
          $ref: '#/components/schemas/TaxLiabilitySourceEnum'
          description: Source of tax liability.
        taxable_amount:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,10}|(?=[\d.]{1,13}0*$)\d{0,10}\.\d{0,2}0*$)
          title: Taxable Amount
          description: Taxable amount.
          default: '0.00'
        currency:
          $ref: '#/components/schemas/CurrencyEnum'
          description: Currency code (ISO 4217, e.g., USD)
          default: USD
        locked:
          type: boolean
          title: Locked
          description: Transaction lock status.
          default: false
        source:
          $ref: '#/components/schemas/SourceEnum'
          description: Source platform (e.g., STRIPE)
          default: OTHER
        connection_id:
          description: Connection Identifier
          type: string
        filing_id:
          description: Filing identifier.
          type: string
        city:
          description: City of the transaction address.
          type: string
        county:
          description: County of the transaction address.
          type: string
        state:
          description: State of the transaction address.
          type: string
        country:
          $ref: '#/components/schemas/CountryCodeEnum'
          description: Country code (ISO Alpha-2).
        postal_code:
          description: Postal code of the transaction.
          type: string
        tax_id:
          description: >-
            Tax ID associated with the transaction. DEPRECATED: This field is
            only populated for QuickBooks integrations and will be removed in a
            future version.
          deprecated: true
          type: string
        status:
          $ref: '#/components/schemas/TransactionStatusEnum'
          description: Transaction status (e.g., COMMITTED)
          default: COMMITTED
        address_status:
          $ref: '#/components/schemas/AddressStatus'
          description: Address verification status (e.g., VERIFIED).
          default: UNVERIFIED
        processing_status:
          $ref: '#/components/schemas/ProcessingStatusEnum'
          description: Status of processing (e.g., ADDRESS_DONE)
          default: QUEUED
        destination_currency:
          $ref: '#/components/schemas/CurrencyEnum'
          description: Destination currency code (ISO 4217, e.g., USD)
        converted_total_amount:
          description: Converted total amount.
          type: string
        converted_total_tax_amount_imported:
          description: Converted imported tax amount.
          type: string
        converted_total_tax_amount_calculated:
          description: Converted calculated tax amount.
          type: string
        conversion_rate:
          description: Currency conversion rate.
          type: string
        converted_taxable_amount:
          description: Converted taxable amount.
          type: string
        converted_total_discount:
          description: Converted total discount amount.
          type: string
        converted_subtotal:
          description: Converted subtotal amount.
          type: string
        converted_total_tax_liability_amount:
          description: Converted total tax liability amount.
          type: string
        id:
          type: string
          title: Id
          description: The unique transaction identifier.
        addresses:
          items:
            $ref: '#/components/schemas/TransactionAddressRead-Output'
          type: array
          title: Addresses
          description: List of addresses associated.
        transaction_items:
          items:
            $ref: '#/components/schemas/TransactionItemRead'
          type: array
          title: Transaction Items
          description: List of items in the transaction.
        customer:
          $ref: '#/components/schemas/CustomerRead'
          description: Customer information associated with the transaction.
        type:
          $ref: '#/components/schemas/TransactionTypeEnum'
          description: |-
            The type of transaction
                                                (e.g., SALE, REFUND, PARTIAL_CREDIT_NOTE).
        total_discount:
          description: Total amount of all discounts applied to the transaction.
          type: string
        subtotal:
          description: Subtotal amount before any discounts are applied.
          type: string
        final_total_amount:
          description: Final total amount including tax liability.
          type: string
        converted_final_total_amount:
          description: Converted final total amount including tax liability.
          type: string
      type: object
      required:
        - organization_id
        - external_id
        - date
        - id
        - addresses
        - transaction_items
        - type
      title: TransactionRead
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error message
      type: object
      required:
        - detail
      title: ErrorResponse
    backend__src__transactions__responses__ValidationErrorResponse:
      properties:
        detail:
          items:
            $ref: >-
              #/components/schemas/backend__src__transactions__responses__ValidationErrorItem
          type: array
          title: Detail
      type: object
      required:
        - detail
      title: ValidationErrorResponse
    ExemptionRequired:
      properties:
        jurisdiction:
          type: string
        customer_id:
          type: string
        organization_id:
          type: string
          title: Organization Id
          description: >-
            Unique identifier of the organization. This field is deprecated, and
            should no longer be used. The value is populated through the
            'x-organization-id' header.
          deprecated: true
        exemption_type:
          $ref: '#/components/schemas/ExemptionType'
        start_date:
          type: string
          format: date-time
          title: Start Date
        status:
          $ref: '#/components/schemas/ExemptionStatus'
        reseller:
          type: boolean
          title: Reseller
      type: object
      required:
        - organization_id
        - exemption_type
        - start_date
        - status
        - reseller
      title: ExemptionRequired
    TransactionRefundStatus:
      type: string
      enum:
        - FULLY_REFUNDED
        - PARTIALLY_REFUNDED
      title: TransactionRefundStatus
      description: >-
        Shopify has 2 order statuses for refund case: refunded and
        partially_refunded

        If the given order has different status from these 2, we will set the

        transaction's refund_status to PARTIALLY_REFUNDED by default.
    TransactionExemptStatusEnum:
      type: string
      enum:
        - NOT_EXEMPT
        - PARTIALLY_EXEMPT
        - FULLY_EXEMPT
        - ZERO_RATE_NOT_EXEMPT
      title: TransactionExemptStatusEnum
      description: |-
        Based on transaction item exempt status.
        NOT EXEMPT: None of the items are NOT EXEMPT
        PARTIALLY EXEMPT: At least some of the items are NOT EXEMPT
        FULLY_EXEMPT: All items sold in the transaction are EXEMPT
        ZERO_RATE_NOT_EXEMPT: All items sold in the transaction are zero-rated
    Exemption:
      properties:
        id:
          type: string
          maxLength: 100
          title: Id
          description: Unique identifier for the exemption
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when transaction was created in Kintsugi.
        updated_at:
          description: Timestamp when transaction was last updated.
          type: string
        exemption_type:
          $ref: '#/components/schemas/ExemptionType'
          description: The type of exemption (e.g., wholesale, resale)
        jurisdiction:
          description: The jurisdiction identifier for the exemption
          type: string
        country_code:
          $ref: '#/components/schemas/CountryCodeEnum'
          description: Country code in ISO 3166-1 alpha-2 format (e.g., 'US')
        start_date:
          type: string
          format: date
          title: Start Date
          description: Start date for the exemption validity period (YYYY-MM-DD format)
        end_date:
          description: End date for the exemption validity period (YYYY-MM-DD format)
          type: string
        customer_id:
          description: Unique identifier for the customer associated with the exemption
          type: string
        transaction_id:
          description: |-
            Unique identifier for the transaction
                    associated with the exemption, if applicable.
          type: string
        reseller:
          type: boolean
          title: Reseller
          description: Indicates whether the exemption is for a reseller
          default: false
        FEIN:
          description: |-
            Federal Employer Identification Number
                    associated with the exemption.
          type: string
        sales_tax_id:
          description: Sales tax ID for the exemption
          type: string
        status:
          $ref: '#/components/schemas/ExemptionStatus'
          description: |-
            The status of the exemption.
                    Defaults to ACTIVE if not provided.
        organization_id:
          type: string
          maxLength: 100
          title: Organization Id
      type: object
      required:
        - exemption_type
        - start_date
      title: Exemption
    TaxLiabilitySourceEnum:
      type: string
      enum:
        - CALCULATED
        - COLLECTED
      title: TaxLiabilitySourceEnum
    CurrencyEnum:
      type: string
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GGP
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - IMP
        - INR
        - IQD
        - IRR
        - ISK
        - JEP
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLL
        - SOS
        - SPL
        - SRD
        - STN
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TVD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VEF
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XDR
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
        - ZWD
      title: CurrencyEnum
    SourceEnum:
      type: string
      enum:
        - BIGCOMMERCE
        - BESTBUY
        - BUNNY
        - CHARGEBEE
        - SHOPIFY
        - STRIPE
        - AMAZON
        - TIKTOK
        - CUSTOM
        - UNKNOWN
        - IMPORT
        - ZUORA
        - APIDECK
        - QUICKBOOKS
        - API
        - APPLE_APP_STORE
        - GOOGLE_APP_STORE
        - WALMART
        - PAYPAL
        - NETSUITE
        - XERO
        - MAXIO
        - RECURLY
        - SALESFORCE
        - ETSY
        - EBAY
        - WIX
        - SQUARESPACE
        - WOOCOMMERCE
        - MAGENTO
        - BILLING_PLATFORM
        - DEEL
        - RIPPLING
        - GUSTO
        - FACEBOOK
        - OTHER
        - ORDWAY
        - INSTAGRAM
        - PINTEREST
        - WAYFAIR
        - WISH
        - POS
        - TARGET
        - NEWEGG
        - GROUPON
        - GOOGLE_EXPRESS
        - NOCNOC
        - MERCADO_LIBRE
        - MODALYST
        - NORDSTROM
        - FAIRE
        - SHOPWARE
        - ZOHO
        - SAGE-INTACCT
        - AIRWALLEX
        - ORB
        - ZENSKAR
        - MICROSOFT_DYNAMICS_365
        - KICKSTARTER
        - INTERNAL_ERP
      title: SourceEnum
    CountryCodeEnum:
      type: string
      enum:
        - AF
        - AX
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BQ
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - CV
        - KH
        - CM
        - CA
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CG
        - CD
        - CK
        - CR
        - HR
        - CU
        - CW
        - CY
        - CZ
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - SZ
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - CI
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MK
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RE
        - RO
        - RU
        - RW
        - BL
        - SH
        - KN
        - LC
        - MF
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SX
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - SS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - US
        - UM
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
        - XK
        - ZZ_EU
      title: CountryCodeEnum
    TransactionStatusEnum:
      type: string
      enum:
        - PENDING
        - COMMITTED
        - CANCELLED
        - FULLY_REFUNDED
        - PARTIALLY_REFUNDED
        - INVALID
        - ARCHIVED
      title: TransactionStatusEnum
    TransactionAddressPublic:
      properties:
        phone:
          description: Phone number associated with the address.
          type: string
        street_1:
          description: Primary street address.
          type: string
        street_2:
          description: >-
            Additional street address details, such as an apartment or suite
            number.
          type: string
        city:
          description: City where the customer resides.
          type: string
        county:
          description: County or district of the customer.
          type: string
        state:
          description: State or province of the customer.
          type: string
        postal_code:
          description: ZIP or Postal code of the customer.
          type: string
        country:
          $ref: '#/components/schemas/CountryCodeEnum'
          description: Country code in ISO 3166-1 alpha-2 format
        full_address:
          description: >-
            Complete address string of the customer, which can be used as an
            alternative to individual fields.
          type: string
        type:
          $ref: '#/components/schemas/AddressType'
          description: 'Type of address. Allowed values: BILL_TO, SHIP_TO.'
      type: object
      required:
        - type
      title: TransactionAddressPublic
      description: Public address class for transaction addresses
    TransactionItemBuilder:
      properties:
        external_id:
          description: External item identifier.
          type: string
        organization_id:
          description: >-
            Unique identifier of the organization. This field is deprecated, and
            should no longer be used. The value is populated through the
            'x-organization-id' header.
          deprecated: true
          type: string
        date:
          type: string
          format: date-time
          title: Date
          description: Date/time of item.
        description:
          description: Item description
          type: string
        external_product_id:
          type: string
          title: External Product Id
          description: External product identifier.
        product:
          description: Product name
          type: string
        product_id:
          description: Product identifier.
          type: string
        product_name:
          description: Product name (detailed)
          type: string
        product_description:
          description: Product description
          type: string
        quantity:
          description: Quantity of item.
          default: '1.0'
          type: number
        amount:
          description: Item amount.
          default: '0.00'
          type: number
        tax_amount_imported:
          description: Imported tax amount for the item.
          default: '0.00'
          type: number
        tax_rate_imported:
          description: Imported tax rate.
          default: '0.00'
          type: number
        tax_amount_calculated:
          description: Calculated tax amount for the item.
          default: '0.00'
          type: number
        tax_rate_calculated:
          description: Calculated tax rate.
          default: '0.00'
          type: number
        original_currency:
          $ref: '#/components/schemas/CurrencyEnum'
          description: Original currency code.
        destination_currency:
          $ref: '#/components/schemas/CurrencyEnum'
          description: Destination currency code.
        converted_amount:
          description: Converted item amount.
          type: number
        converted_taxable_amount:
          description: Converted taxable amount.
          type: number
        converted_tax_amount_imported:
          description: Converted imported tax amount.
          type: number
        converted_tax_amount_calculated:
          description: Converted calculated tax amount
          type: number
        converted_total_discount:
          description: Converted total discount amount.
          type: number
        converted_subtotal:
          description: Converted subtotal amount.
          type: number
        taxable_amount:
          description: Taxable amount for the item.
          default: '0.00'
          type: number
        tax_exemption:
          $ref: '#/components/schemas/TaxExemptionEnum'
          description: Tax exemption status.
        exempt:
          type: boolean
          title: Exempt
          description: Indicates if the item is exempt.
          default: false
        tax_items:
          items:
            $ref: '#/components/schemas/TaxItemBuilder'
          type: array
          title: Tax Items
          default: []
        discount_builder:
          $ref: '#/components/schemas/DiscountBuilder'
      type: object
      required:
        - organization_id
        - date
        - external_product_id
      title: TransactionItemBuilder
    CustomerBaseBase:
      properties:
        phone:
          description: Phone number associated with the address.
          type: string
        street_1:
          description: Primary street address.
          type: string
        street_2:
          description: >-
            Additional street address details, such as an apartment or suite
            number.
          type: string
        city:
          description: City where the customer resides.
          type: string
        county:
          description: County or district of the customer.
          type: string
        state:
          description: State or province of the customer.
          type: string
        postal_code:
          description: ZIP or Postal code of the customer.
          type: string
        country:
          $ref: '#/components/schemas/CountryCodeEnum'
          description: Country code in ISO 3166-1 alpha-2 format
        full_address:
          description: >-
            Complete address string of the customer, which can be used as an
            alternative to individual fields.
          type: string
        name:
          description: Name of the customer.
          type: string
        external_id:
          description: A unique identifier for the customer.
          type: string
        status:
          $ref: '#/components/schemas/StatusEnum'
          description: Status of the customer (e.g., ACTIVE, INACTIVE).
          default: ACTIVE
        email:
          description: Email address of the customer.
          type: string
        address_status:
          $ref: '#/components/schemas/AddressStatus'
          description: Address status of the customer. Defaults to UNVERIFIED.
          default: UNVERIFIED
        source:
          $ref: '#/components/schemas/SourceEnum'
          description: >-
            Source of the customer information (e.g., BIGCOMMERCE, STRIPE,
            etc.).
        registration_number:
          type: string
        connection_id:
          description: Unique identifier of the connection related to the customer.
          type: string
        enriched_fields:
          description: Additional enriched fields for the customer, if available.
          type: string
        organization_id:
          type: string
          maxLength: 100
          title: Organization Id
        is_test_data:
          type: boolean
          title: Is Test Data
          default: false
      type: object
      required:
        - organization_id
      title: CustomerBaseBase
    TransactionTypeEnum:
      type: string
      enum:
        - SALE
        - FULL_CREDIT_NOTE
        - PARTIAL_CREDIT_NOTE
        - TAX_REFUND
        - ARCHIVE
      title: TransactionTypeEnum
    AddressStatus:
      type: string
      enum:
        - UNVERIFIED
        - INVALID
        - PARTIALLY_VERIFIED
        - VERIFIED
        - UNVERIFIABLE
        - BLANK
      title: AddressStatus
    ProcessingStatusEnum:
      type: string
      enum:
        - NEW
        - UPDATED
        - QUEUED
        - ADDRESS_DONE
        - EXEMPT_DONE
        - NEXUS_DONE
        - PROCESSED
        - FILING_STARTED
        - FILING_DONE
        - LOCKED
        - PENDING
        - ARCHIVED
        - NEEDS_REFETCH
        - EXCLUDED_IN_CALCULATION
      title: ProcessingStatusEnum
      description: >-
        Our transaction state, used to determine when/if a transaction needs
        additional

        processing.
    TransactionAddressRead-Output:
      properties:
        phone:
          description: Phone number associated with the address.
          type: string
        street_1:
          description: Primary street address.
          type: string
        street_2:
          description: >-
            Additional street address details, such as an apartment or suite
            number.
          type: string
        city:
          description: City where the customer resides.
          type: string
        county:
          description: County or district of the customer.
          type: string
        state:
          description: State or province of the customer.
          type: string
        postal_code:
          description: ZIP or Postal code of the customer.
          type: string
        country:
          $ref: '#/components/schemas/CountryCodeEnum'
          description: Country code in ISO 3166-1 alpha-2 format
        full_address:
          description: >-
            Complete address string of the customer, which can be used as an
            alternative to individual fields.
          type: string
        type:
          $ref: '#/components/schemas/AddressType'
          description: 'Type of address. Allowed values: BILL_TO, SHIP_TO.'
        status:
          $ref: '#/components/schemas/AddressStatus'
          description: >-
            Address verification status.** This field is ignored when updating
            addresses. The status of the address is updated automatically. **
          default: UNVERIFIED
        id:
          description: Unique identifier of the address being updated.
          type: string
        transaction_id:
          description: ID of the transaction associated with the address.
          type: string
        connection_id:
          description: ID of the connection associated with the address.
          type: string
      type: object
      required:
        - type
      title: TransactionAddressRead
    TransactionItemRead:
      properties:
        external_id:
          description: External item identifier.
          type: string
        organization_id:
          description: >-
            Unique identifier of the organization. This field is deprecated, and
            should no longer be used. The value is populated through the
            'x-organization-id' header.
          deprecated: true
          type: string
        date:
          type: string
          format: date-time
          title: Date
          description: Date/time of item.
        description:
          description: Item description
          type: string
        external_product_id:
          type: string
          title: External Product Id
          description: External product identifier.
        product:
          description: Product name
          type: string
        product_id:
          description: Product identifier.
          type: string
        product_name:
          description: Product name (detailed)
          type: string
        product_description:
          description: Product description
          type: string
        quantity:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,20}|(?=[\d.]{1,41}0*$)\d{0,20}\.\d{0,20}0*$)
          title: Quantity
          description: Quantity of item.
          default: '1.0'
        amount:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,10}|(?=[\d.]{1,13}0*$)\d{0,10}\.\d{0,2}0*$)
          title: Amount
          description: Item amount.
          default: '0.00'
        tax_amount_imported:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,10}|(?=[\d.]{1,13}0*$)\d{0,10}\.\d{0,2}0*$)
          title: Tax Amount Imported
          description: Imported tax amount for the item.
          default: '0.00'
        tax_rate_imported:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,3}|(?=[\d.]{1,13}0*$)\d{0,3}\.\d{0,9}0*$)
          title: Tax Rate Imported
          description: Imported tax rate.
          default: '0.00'
        tax_amount_calculated:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,10}|(?=[\d.]{1,13}0*$)\d{0,10}\.\d{0,2}0*$)
          title: Tax Amount Calculated
          description: Calculated tax amount for the item.
          default: '0.00'
        tax_rate_calculated:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,3}|(?=[\d.]{1,13}0*$)\d{0,3}\.\d{0,9}0*$)
          title: Tax Rate Calculated
          description: Calculated tax rate.
          default: '0.00'
        original_currency:
          $ref: '#/components/schemas/CurrencyEnum'
          description: Original currency code.
        destination_currency:
          $ref: '#/components/schemas/CurrencyEnum'
          description: Destination currency code.
        converted_amount:
          description: Converted item amount.
          type: string
        converted_taxable_amount:
          description: Converted taxable amount.
          type: string
        converted_tax_amount_imported:
          description: Converted imported tax amount.
          type: string
        converted_tax_amount_calculated:
          description: Converted calculated tax amount
          type: string
        converted_total_discount:
          description: Converted total discount amount.
          type: string
        converted_subtotal:
          description: Converted subtotal amount.
          type: string
        taxable_amount:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,10}|(?=[\d.]{1,13}0*$)\d{0,10}\.\d{0,2}0*$)
          title: Taxable Amount
          description: Taxable amount for the item.
          default: '0.00'
        tax_exemption:
          $ref: '#/components/schemas/TaxExemptionEnum'
          description: Tax exemption status.
        exempt:
          type: boolean
          title: Exempt
          description: Indicates if the item is exempt.
          default: false
        id:
          type: string
          title: Id
          description: The unique transaction item identifier.
        tax_items:
          items:
            $ref: '#/components/schemas/TaxItemRead'
          type: array
          title: Tax Items
          description: List of tax items associated with the transaction item.
        total_discount:
          description: Total discount amount applied to this transaction item.
          type: string
        subtotal:
          description: Subtotal amount before any discount is applied.
          type: string
      type: object
      required:
        - organization_id
        - date
        - external_product_id
        - id
        - tax_items
      title: TransactionItemRead
    CustomerRead:
      properties:
        phone:
          description: Customer's phone number
          type: string
        street_1:
          description: Primary street address.
          type: string
        street_2:
          description: >-
            Additional street address details, such as an apartment or suite
            number.
          type: string
        city:
          description: City where the customer resides.
          type: string
        county:
          description: County or district of the customer.
          type: string
        state:
          description: State or province of the customer.
          type: string
        postal_code:
          description: ZIP or Postal code of the customer.
          type: string
        country:
          $ref: '#/components/schemas/CountryCodeEnum'
          description: Country code in ISO 3166-1 alpha-2 format
        full_address:
          description: >-
            Complete address string of the customer, which can be used as an
            alternative to individual fields.
          type: string
        name:
          description: Name of the customer.
          type: string
        external_id:
          description: External identifier associated with the customer.
          type: string
        status:
          $ref: '#/components/schemas/StatusEnum'
          description: Status of the customer.
          default: ACTIVE
        email:
          description: Customer's email address
          type: string
        source:
          $ref: '#/components/schemas/SourceEnum'
          description: Source of the customer's record.
        connection_id:
          description: Identifier for the connection source, if applicable.
          type: string
        address_status:
          $ref: '#/components/schemas/AddressStatus'
          description: Status of address verification
          default: UNVERIFIED
        registration_number:
          description: Registration number of the customer.
          type: string
        external_friendly_id:
          description: >-
            External friendly identifier associated with the customer. We need
            it for netsuite.
          type: string
        customer_tax_registrations:
          items:
            $ref: '#/components/schemas/CustomerTaxRegistrationRead'
          type: array
          title: Customer Tax Registrations
          description: Customer tax registrations associated with the customer.
        id:
          type: string
          title: Id
          description: Unique identifier for the customer required.
        organization_id:
          type: string
          title: Organization Id
          description: >-
            Unique identifier for the organization associated with the customer.
            Required.
      type: object
      required:
        - id
        - organization_id
      title: CustomerRead
    backend__src__transactions__responses__ValidationErrorItem:
      properties:
        type:
          type: string
          title: Type
          description: |-
            Validation issues, such as missing required
                                fields or invalid field values.
        loc:
          items:
            type: string
          type: array
          title: Loc
          description: Location of error
        msg:
          type: string
          title: Msg
          description: Error message
        input:
          title: Input
          description: Invalid input value
        ctx:
          additionalProperties: true
          type: object
          title: Ctx
          description: Additional context
      type: object
      required:
        - type
        - loc
        - msg
        - input
        - ctx
      title: ValidationErrorItem
    ExemptionType:
      type: string
      enum:
        - customer
        - wholesale
        - transaction
      title: ExemptionType
    ExemptionStatus:
      type: string
      enum:
        - ACTIVE
        - INACTIVE
        - EXPIRED
        - DEACTIVATED
        - ARCHIVED
      title: ExemptionStatus
    AddressType:
      type: string
      enum:
        - BILL_TO
        - SHIP_TO
        - SHIP_FROM
        - BILL_FROM
      title: AddressType
    TaxExemptionEnum:
      type: string
      enum:
        - PRODUCT
        - TRANSACTION
        - CUSTOMER
        - REGION
        - REVERSE_CHARGE
        - ZERO_RATE_TAX
        - HIGH_VALUE_PHYSICAL_GOODS
        - EXPORT
        - ZERO_VALUE_ITEM
        - NO_RULE_FOUND
        - IMPORTED
        - ZERO_RATE_NOT_EXEMPT
      title: TaxExemptionEnum
      description: This enum is used to determine if a transaction is exempt from tax.
    TaxItemBuilder:
      properties:
        rule_id:
          type: string
          title: Rule Id
          description: The rule ID of the tax item
          default: '0000'
        rate:
          type: number
        amount:
          type: number
        converted_amount:
          type: number
        currency:
          $ref: '#/components/schemas/CurrencyEnum'
        destination_currency:
          $ref: '#/components/schemas/CurrencyEnum'
        external_id:
          type: string
        name:
          type: string
          maxLength: 250
          title: Name
          description: 'Deprecated: use `jurisdiction_type` instead'
        type:
          $ref: '#/components/schemas/TaxItemTypeEnum'
          maxLength: 50
          default: IMPORTED
        jurisdiction_type:
          $ref: '#/components/schemas/JurisdictionType'
        jurisdiction_name:
          type: string
        organization_id:
          type: string
      type: object
      required:
        - rate
        - amount
        - name
        - organization_id
      title: TaxItemBuilder
    DiscountBuilder:
      properties:
        external_id:
          type: string
        applied_to:
          $ref: '#/components/schemas/AppliedTo'
        discount_amount:
          default: '0.00'
          type: number
      type: object
      required:
        - applied_to
      title: DiscountBuilder
    StatusEnum:
      type: string
      enum:
        - ACTIVE
        - ARCHIVED
      title: StatusEnum
    TaxItemRead:
      properties:
        rule_id:
          type: string
          title: Rule Id
          description: The rule ID of the tax item
          default: '0000'
        rate:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,3}|(?=[\d.]{1,13}0*$)\d{0,3}\.\d{0,9}0*$)
          title: Rate
        amount:
          type: string
          pattern: >-
            ^(?!^[-+.]*$)[+-]?0*(?:\d{0,10}|(?=[\d.]{1,13}0*$)\d{0,10}\.\d{0,2}0*$)
          title: Amount
        converted_amount:
          type: string
        currency:
          $ref: '#/components/schemas/CurrencyEnum'
        destination_currency:
          $ref: '#/components/schemas/CurrencyEnum'
        external_id:
          type: string
        name:
          type: string
          maxLength: 250
          title: Name
          description: 'Deprecated: use `jurisdiction_type` instead'
        type:
          $ref: '#/components/schemas/TaxItemTypeEnum'
          maxLength: 50
          default: IMPORTED
        jurisdiction_type:
          $ref: '#/components/schemas/JurisdictionType'
        jurisdiction_name:
          type: string
      type: object
      required:
        - rate
        - amount
        - name
      title: TaxItemRead
    CustomerTaxRegistrationRead:
      properties:
        id:
          type: string
          title: Id
        customer_id:
          type: string
          title: Customer Id
        country_code:
          $ref: '#/components/schemas/CountryCodeEnum'
        tax_type:
          $ref: '#/components/schemas/CustomerTaxTypeEnum'
        tax_id:
          type: string
          title: Tax Id
        is_valid:
          type: boolean
          title: Is Valid
      type: object
      required:
        - id
        - customer_id
        - country_code
        - tax_type
        - tax_id
        - is_valid
      title: CustomerTaxRegistrationRead
    TaxItemTypeEnum:
      type: string
      enum:
        - IMPORTED_ORIGINAL
        - IMPORTED
        - CALCULATED
      title: TaxItemTypeEnum
    JurisdictionType:
      type: string
      enum:
        - COUNTRY
        - FEDERAL
        - STATE
        - COUNTY
        - CITY
        - SPECIAL
        - OTHER
        - HYBRID
      title: JurisdictionType
    AppliedTo:
      type: string
      enum:
        - TRANSACTION
        - TRANSACTION_ITEM
      title: AppliedTo
    CustomerTaxTypeEnum:
      type: string
      enum:
        - gst
        - hst
        - gst_hst
        - qst
        - pst
        - rst
        - vat
        - unknown
      title: CustomerTaxTypeEnum
      description: Enum for customer tax registration types.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-KEY
    CustomHeader:
      type: apiKey
      in: header
      name: x-organization-id

````