{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/thomson-reuters/main/json-schema/thomson-reuters-transaction-extract-request-schema.json",
  "title": "TransactionExtractRequest",
  "description": "Extract Transactions Request",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thomson-reuters-next-generation-reporting-rest-apis-openapi.yml#/components/schemas/TransactionExtractRequest",
  "required": [
    "endDate",
    "startDate"
  ],
  "type": "object",
  "properties": {
    "companyNames": {
      "type": "array",
      "description": "Names of companies in the Determination database.",
      "items": {
        "type": "string",
        "description": "Names of companies in the Determination database."
      }
    },
    "dateType": {
      "$ref": "#/$defs/DateTypes"
    },
    "startDate": {
      "type": "string",
      "description": "Start date for a given date range."
    },
    "endDate": {
      "type": "string",
      "description": "End date(inclusive) for a given date range."
    },
    "movementDateType": {
      "type": "string",
      "description": "Movement date type for with the date range is specified :[Movement Date,Movement Date - Line,Original Movement Date, Original Movement Date - Line]",
      "enum": [
        "Movement Date",
        "Movement Date - Line",
        "Original Movement Date",
        "Original Movement Date - Line"
      ]
    },
    "movementStartDate": {
      "type": "string",
      "description": "Movement start date of date range for which the extract is being requested"
    },
    "movementEndDate": {
      "type": "string",
      "description": "Movement end date of date range for which the extract is being requested"
    },
    "taxableCountries": {
      "type": "array",
      "description": "Countries where selected companies have a tax obligation.",
      "items": {
        "type": "string",
        "description": "Countries where selected companies have a tax obligation."
      }
    },
    "taxableStates": {
      "type": "array",
      "description": "States where the selected company or companies have tax obligations.",
      "items": {
        "type": "string",
        "description": "States where the selected company or companies have tax obligations."
      }
    },
    "taxableProvinces": {
      "type": "array",
      "description": "Provinces where the selected company or companies have tax obligations.",
      "items": {
        "type": "string",
        "description": "Provinces where the selected company or companies have tax obligations."
      }
    },
    "authorityTypes": {
      "type": "array",
      "description": "List of authority types for which the transactions to be included in the response",
      "items": {
        "type": "string",
        "description": "List of authority types for which the transactions to be included in the response"
      }
    },
    "transactionTypes": {
      "type": "array",
      "description": "2-digit code based on the selected company(s) used in tax data.",
      "items": {
        "type": "string",
        "description": "2-digit code based on the selected company(s) used in tax data."
      }
    },
    "taxTypes": {
      "type": "array",
      "description": "2-character abbreviation code used in tax data. Tax type is determined when the jurisdiction is determined. Some tax types are specific to only US or International transactions.",
      "items": {
        "type": "string",
        "description": "2-character abbreviation code used in tax data. Tax type is determined when the jurisdiction is determined. Some tax types are specific to only US or International transactions."
      }
    },
    "authorityNames": {
      "type": "array",
      "description": "List of tax authority names for which the transactions to be included in the response",
      "items": {
        "type": "string",
        "description": "List of tax authority names for which the transactions to be included in the response"
      }
    },
    "productCodes": {
      "type": "array",
      "description": "ERP system product codes.",
      "items": {
        "type": "string",
        "description": "ERP system product codes."
      }
    },
    "companyRoles": {
      "type": "array",
      "description": "The role the company plays in a given transaction:Buyer,Seller,or Middleman. Also seen in Determination as Merchant role.",
      "items": {
        "type": "string",
        "description": "The role the company plays in a given transaction:Buyer,Seller,or Middleman. Also seen in Determination as Merchant role."
      }
    },
    "taxDirection": {
      "type": "string",
      "description": "Specifies direction in which taxes are paid:\n·Empty String (Any)\n·I (Input Tax)\n·O (Output Tax)"
    },
    "commodityCodes": {
      "type": "array",
      "description": "Commodity identifier for a transaction.",
      "items": {
        "type": "string",
        "description": "Commodity identifier for a transaction."
      }
    },
    "customerNumbers": {
      "type": "array",
      "description": "An optional customer number(s) to limit output.",
      "items": {
        "type": "string",
        "description": "An optional customer number(s) to limit output."
      }
    },
    "documentNumbers": {
      "type": "array",
      "description": "List of document numbers, document number is a transaction identifier;for example,an invoice or credit memo number.",
      "items": {
        "type": "string",
        "description": "List of document numbers, document number is a transaction identifier;for example,an invoice or credit memo number."
      }
    },
    "vendorNumbers": {
      "type": "array",
      "description": "Comes from Determination data source.",
      "items": {
        "type": "string",
        "description": "Comes from Determination data source."
      }
    },
    "fields": {
      "type": "array",
      "description": "List of column name (header).",
      "items": {
        "type": "string",
        "description": "List of column name (header)."
      }
    },
    "attributeFilters": {
      "type": "array",
      "description": "List of custom attribute predicates for which the transactions to be included in the response",
      "items": {
        "$ref": "#/$defs/AttributeFilter"
      }
    },
    "excludeFullyExemptTransactions": {
      "type": "boolean",
      "description": "\"True\" omits fully exempt tax lines.\"False\"includes fully exempt tax lines."
    },
    "vctAppliedFlag": {
      "type": "boolean",
      "description": "\"True\" VCT applied \"False\"VCT not applied"
    },
    "offset": {
      "minimum": 0,
      "type": "integer",
      "description": "Offset of paginated response",
      "format": "int32"
    },
    "limit": {
      "minimum": 1,
      "type": "integer",
      "description": "Limit of records per page of response",
      "format": "int32"
    }
  },
  "$defs": {
    "AttributeFilter": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Custom attribute name"
        },
        "operator": {
          "type": "string",
          "description": "This field accepts the following:\neq - equal\nne - not equal",
          "enum": [
            "eq",
            "ne"
          ]
        },
        "value": {
          "type": "string",
          "description": "The custom attribute value for which records needs compared and included."
        }
      },
      "description": "List of custom attribute predicates for which the transactions to be included in the response"
    },
    "DateTypes": {
      "type": "string",
      "description": "Identifies one of the following date types for transactions in the database:\n·Transaction - The date range is based on the date the taxcalculation occurs for the document. Format must be yyyy-mm-dd.\n·Document - The date range is based on document dates. Format must be yyyy-mm-dd. \n·Fiscal - The date range is based on fiscal dates indicated by each transaction. Format must be yyyy-mm-dd. \n·Creation - The timestamp range is based on creation date. Format must be yyyy-mm-dd hh:mm:ss.\n·Insert - The timestamp range is based on insert timestamp. Format must be yyyy-mm-dd hh:mm:ss.",
      "enum": [
        "transaction",
        "fiscal",
        "document",
        "creation",
        "insert"
      ]
    }
  }
}