Avalara · Schema

CreateTransactionModel

Taxes

Properties

Name Type Description
type string The type of document to create
companyCode string Company code of the company creating this transaction
date string Date of the transaction
customerCode string Unique code identifying the customer
commit boolean Whether to commit the transaction immediately
currencyCode string Three-character ISO 4217 currency code
addresses object
lines array Line items for the transaction
View JSON Schema on GitHub

JSON Schema

avalara-createtransactionmodel-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CreateTransactionModel",
  "title": "CreateTransactionModel",
  "type": "object",
  "required": [
    "type",
    "companyCode",
    "date",
    "customerCode",
    "lines"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "SalesOrder",
        "SalesInvoice",
        "PurchaseOrder",
        "PurchaseInvoice",
        "ReturnOrder",
        "ReturnInvoice"
      ],
      "description": "The type of document to create"
    },
    "companyCode": {
      "type": "string",
      "description": "Company code of the company creating this transaction"
    },
    "date": {
      "type": "string",
      "format": "date",
      "description": "Date of the transaction"
    },
    "customerCode": {
      "type": "string",
      "description": "Unique code identifying the customer"
    },
    "commit": {
      "type": "boolean",
      "default": false,
      "description": "Whether to commit the transaction immediately"
    },
    "currencyCode": {
      "type": "string",
      "description": "Three-character ISO 4217 currency code"
    },
    "addresses": {
      "type": "object",
      "properties": {
        "shipFrom": {
          "$ref": "#/components/schemas/AddressInfo"
        },
        "shipTo": {
          "$ref": "#/components/schemas/AddressInfo"
        },
        "pointOfOrderOrigin": {
          "$ref": "#/components/schemas/AddressInfo"
        },
        "pointOfOrderAcceptance": {
          "$ref": "#/components/schemas/AddressInfo"
        }
      }
    },
    "lines": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/LineItemModel"
      },
      "description": "Line items for the transaction"
    }
  }
}