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

# Create new tax transaction

> Create new tax transaction for Estimates or Final Sales Invoice



## OpenAPI

````yaml oms_v1 post /api-tax/tax/create
openapi: 3.0.0
info:
  description: Order Management System
  version: 1.0.0
  title: Orders v1 (OMS v1)
  contact:
    email: oms-team@fabric.inc
  license:
    name: fabric API license
    url: https://fabric.inc/api-license
servers:
  - url: https://prod01-apigw.{customer_name}.fabric.zone
    description: Production
    variables:
      customer_name:
        default: yourcompany
        description: Customer name, provided by support team
security: []
tags:
  - name: Cart
    description: >-
      Cart APIs<br /><br />**Note:** These are the legacy Cart APIs. To view
      fabric's new Cart APIs, navigate to *Cart API > Cart* from the left side
      navigation pane.
  - name: Bill To
    description: Bill To APIs [Deprecated]
  - name: Ship To
    description: >-
      Ship To APIs<br /><br />**Note:** These are the legacy Ship To APIs. To
      view fabric's new Shipping APIs, navigate to *Cart API > Shipping* from
      the left side navigation pane.
  - name: Wishlist
    description: Wishlist APIs
  - name: Cart Decoupled
    description: Cart Decoupled APIs
  - name: Warehouse
    description: Warehouse APIs
  - name: Inventory
    description: Inventory APIs
  - name: Attributes
    description: >-
      Attributes APIs<br /><br />**Note:** These are the legacy Attribute APIs.
      To view fabric's new Attribute APIs, navigate to *Cart API > Attribute*
      from the left side navigation pane.
  - name: List
    description: List APIs
  - name: Tax/Address Validate
    description: Tax/Address Validate APIs
  - name: Shipping
    description: Shipping APIs
  - name: Payments
    description: Payments APIs
  - name: Order
    description: Order APIs
paths:
  /api-tax/tax/create:
    post:
      tags:
        - Tax/Address Validate
      summary: Create new tax transaction
      description: Create new tax transaction for Estimates or Final Sales Invoice
      operationId: createTax
      parameters:
        - $ref: '#/components/parameters/xSiteContent'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - lineItems
                - addresses
              properties:
                type:
                  type: string
                  enum:
                    - SalesInvoice
                    - SalesOrder
                  example: SalesInvoice
                lineItems:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                      - price
                      - quantity
                      - taxCode
                      - title
                    properties:
                      price:
                        type: number
                        minimum: 0
                        example: 12.99
                      quantity:
                        type: number
                        minimum: 1
                        multipleOf: 1
                        example: 3
                      taxCode:
                        type: string
                        minLength: 3
                        example: PF050099
                      title:
                        type: string
                        minLength: 3
                        example: Fabric Inc T-Shirt
                      sku:
                        type: string
                        minLength: 3
                        example: 123456789Red-Shirt
                      lineItem:
                        type: integer
                        minimum: 1
                        example: 3
                addresses:
                  type: object
                  required:
                    - shipTo
                    - shipFrom
                  properties:
                    shipTo:
                      type: object
                      required:
                        - street1
                        - city
                        - state
                        - country
                        - zipCode
                      properties:
                        street1:
                          type: string
                          minLength: 3
                          example: 2000 Main Street
                        city:
                          type: string
                          minLength: 3
                          example: Irvine
                        state:
                          type: string
                          minLength: 2
                          example: CA
                        country:
                          type: string
                          minLength: 2
                          example: US
                        zipCode:
                          type: string
                          minLength: 3
                          example: '92614'
                    shipFrom:
                      type: object
                      required:
                        - street1
                        - city
                        - state
                        - country
                        - zipCode
                      properties:
                        street1:
                          type: string
                          minLength: 3
                          example: 2000 Main Street
                        city:
                          type: string
                          minLength: 3
                          example: Irvine
                        state:
                          type: string
                          minLength: 2
                          example: CA
                        country:
                          type: string
                          minLength: 2
                          example: US
                        zipCode:
                          type: string
                          minLength: 3
                          example: '92614'
      responses:
        '200':
          description: Created tax
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: e2ab8924-4316-47b6-880d-3744b16aaa4f
                  date:
                    type: string
                    example: '2021-09-19'
                  status:
                    type: string
                    example: Saved
                  type:
                    type: string
                    example: SalesInvoice
                  customerCode:
                    type: string
                    example: FABRIC_INC
                  totalAmount:
                    type: number
                    example: 2063.39
                  totalExempt:
                    type: number
                    example: 182.97
                  totalDiscount:
                    type: number
                    example: 0
                  totalTax:
                    type: number
                    example: 145.73
                  totalTaxable:
                    type: number
                    example: 1880.42
                  totalTaxCalculated:
                    type: number
                    example: 145.73
                  lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                          example: 6000306551642
                        lineNumber:
                          type: string
                          example: '1'
                        description:
                          type: string
                          example: Chocolate
                        isItemTaxable:
                          type: boolean
                          example: true
                        lineAmount:
                          type: number
                          example: null
                        quantity:
                          type: number
                          example: 2
                        tax:
                          type: number
                          example: 139.5
                        taxableAmount:
                          type: number
                          example: 1800
                        taxCalculated:
                          type: number
                          example: 139.5
                        taxCode:
                          type: string
                          example: P0000000
        '400':
          $ref: '#/components/responses/GenericClientError'
        '500':
          $ref: '#/components/responses/GenericServerError'
components:
  parameters:
    xSiteContent:
      name: x-site-context
      in: header
      description: >-
        The `x-site-context` header is a JSON object that contains information
        about the source you wish to pull from. The mandatory `account` is the
        24 character identifier found in Copilot. The `channel` (Sales channel
        ID), `stage` (environment name), and `date` attributes can be used to
        further narrow the scope of your data source.
      required: true
      schema:
        type: string
        example: >-
          {"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account":
          "1234abcd5678efgh9ijklmno","stage":"production"}
  responses:
    GenericClientError:
      description: A generic client error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                description: The error code
                type: string
              message:
                description: The error message
                type: string
    GenericServerError:
      description: A generic server error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                description: The error code
                type: string
              message:
                description: The error message
                type: string

````