openapi: 3.1.0 info: title: Avalara Communications Tax API description: >- The Avalara Communications Tax API (AFC SaasPro) provides communications tax calculations for telecom, VoIP, internet, and other communications services. It supports tax calculations using transaction/service pairs, jurisdiction determination via geocoding, and customizable tax profiles for accurate communications tax compliance. version: '2.0' contact: name: Avalara Developer Relations url: https://developer.avalara.com/ email: developer.relations@avalara.com license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 termsOfService: https://legal.avalara.com/#siteterms externalDocs: description: Communications Tax API Documentation url: https://developer.avalara.com/api-reference/communications/v2/ servers: - url: https://communicationsua.avalara.net description: Communications API Production tags: - name: Customization description: Manage tax profiles, exemptions, and overrides - name: Geocoding description: Determine tax jurisdictions from addresses - name: Lookup description: Look up service and transaction type information - name: Tax Calculation description: Calculate communications taxes on transactions security: - basicAuth: [] paths: /api/v2/afc/CalcTaxes: post: operationId: calcTaxes summary: Avalara Calculate Taxes on a Transaction description: >- Calculates communications taxes for one or more line items based on transaction type, service type, and jurisdiction information. Supports both individual and batch tax calculations. tags: - Tax Calculation requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CalcTaxesRequest' responses: '200': description: Tax calculation results content: application/json: schema: $ref: '#/components/schemas/CalcTaxesResponse' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /api/v2/afc/commit: post: operationId: commitTransaction summary: Avalara Commit a Transaction description: >- Commits a previously calculated transaction, finalizing it for tax reporting purposes. tags: - Tax Calculation requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitRequest' responses: '200': description: Transaction committed successfully content: application/json: schema: $ref: '#/components/schemas/CommitResponse' /api/v2/afc/CalcAdj: post: operationId: calcAdjustment summary: Avalara Calculate Adjustment Taxes description: >- Calculates taxes for adjustments (credits, refunds) on previously committed transactions. tags: - Tax Calculation requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CalcAdjRequest' responses: '200': description: Adjustment tax calculation results content: application/json: schema: $ref: '#/components/schemas/CalcTaxesResponse' /api/v2/geo/Geocode: post: operationId: geocode summary: Avalara Geocode an Address description: >- Determines the tax jurisdiction for a given address using geocoding. Returns jurisdiction codes (PCode, FIPS) needed for tax calculations. tags: - Geocoding requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GeocodeRequest' responses: '200': description: Geocoding results content: application/json: schema: $ref: '#/components/schemas/GeocodeResult' /api/v2/afc/PCode/{pcode}: get: operationId: getPCodeInfo summary: Avalara Get PCode Jurisdiction Information description: >- Retrieves detailed jurisdiction information for a given PCode (proprietary jurisdiction code). tags: - Lookup parameters: - name: pcode in: path required: true schema: type: integer description: The PCode to look up responses: '200': description: PCode jurisdiction details /api/v2/afc/tspairs: get: operationId: getTransactionServicePairs summary: Avalara List Transaction/service Type Pairs description: >- Returns all valid transaction type and service type pairs that can be used for tax calculations. tags: - Lookup responses: '200': description: List of transaction/service type pairs content: application/json: schema: type: array items: $ref: '#/components/schemas/TSPairModel' /api/v2/afc/taxtype/{taxType}: get: operationId: getTaxTypeInfo summary: Avalara Get Tax Type Details description: Retrieves details for a specific tax type identifier. tags: - Lookup parameters: - name: taxType in: path required: true schema: type: integer responses: '200': description: Tax type details /api/v2/afc/serviceinfo: get: operationId: getServiceInfo summary: Avalara Get Service Information description: Returns version and status information for the Communications API. tags: - Lookup security: [] responses: '200': description: Service information content: application/json: schema: $ref: '#/components/schemas/ServiceInfo' /api/v2/afc/customization/profiles: get: operationId: getProfiles summary: Avalara List Tax Profiles description: Retrieves all configured tax profiles for the client. tags: - Customization responses: '200': description: List of tax profiles post: operationId: createProfile summary: Avalara Create a Tax Profile description: Creates a new tax profile with custom bundles and overrides. tags: - Customization requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TaxProfile' responses: '201': description: Tax profile created /api/v2/afc/customization/exclusions: get: operationId: getExclusions summary: Avalara List Tax Exclusions description: Retrieves configured tax exclusions. tags: - Customization responses: '200': description: List of exclusions post: operationId: createExclusion summary: Avalara Create a Tax Exclusion tags: - Customization requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Exclusion' responses: '201': description: Exclusion created components: securitySchemes: basicAuth: type: http scheme: basic description: >- Use your AFC SaasPro credentials for basic authentication responses: BadRequest: description: Invalid request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' Unauthorized: description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' schemas: CalcTaxesRequest: type: object required: - cmpn - inv properties: cmpn: $ref: '#/components/schemas/CompanyData' inv: type: array items: $ref: '#/components/schemas/Invoice' description: Array of invoices to calculate taxes for CompanyData: type: object properties: bscl: type: integer description: Business class (0=ILEC, 1=CLEC, etc.) svcl: type: integer description: Service class (0=Primary Local, 1=Primary Long Distance) fclt: type: boolean description: Facilities-based indicator frch: type: boolean description: Franchise indicator reg: type: boolean description: Regulated indicator Invoice: type: object properties: doc: type: string description: Document code cmmt: type: boolean description: Commit indicator bill: $ref: '#/components/schemas/Location' cust: type: integer description: Customer type date: type: string format: date-time description: Invoice date itms: type: array items: $ref: '#/components/schemas/LineItem' description: Line items on the invoice LineItem: type: object properties: ref: type: string description: Line item reference from: $ref: '#/components/schemas/Location' to: $ref: '#/components/schemas/Location' chg: type: number format: double description: Charge amount line: type: integer description: Number of lines loc: type: integer description: Number of locations min: type: number format: double description: Minutes sale: type: integer description: Sale type (0=Wholesale, 1=Retail, 2=Consumed) tran: type: integer description: Transaction type serv: type: integer description: Service type Location: type: object properties: pcd: type: integer description: PCode for jurisdiction ctry: type: string description: Country ISO code st: type: string description: State abbreviation cty: type: string description: County name zip: type: string description: ZIP code geo: type: boolean description: Whether to geocode the address addr: type: string description: Street address for geocoding CalcTaxesResponse: type: object properties: inv: type: array items: $ref: '#/components/schemas/InvoiceResult' InvoiceResult: type: object properties: doc: type: string description: Document code itms: type: array items: $ref: '#/components/schemas/LineItemResult' LineItemResult: type: object properties: ref: type: string description: Line item reference txs: type: array items: $ref: '#/components/schemas/TaxResult' TaxResult: type: object properties: bill: type: boolean description: Billable flag cmpl: type: boolean description: Compliance flag tm: type: number format: double description: Taxable measure calc: type: integer description: Calculation type cat: type: string description: Tax category cid: type: integer description: Category ID name: type: string description: Tax name exm: type: number format: double description: Exempt amount lns: type: integer description: Lines min: type: number format: double description: Minutes pcd: type: integer description: PCode rate: type: number format: double description: Tax rate sur: type: boolean description: Surcharge flag tax: type: number format: double description: Tax amount lvl: type: integer description: Tax level (Federal, State, County, Local) tid: type: integer description: Tax type ID CommitRequest: type: object properties: doc: type: string description: Document code to commit cmmt: type: boolean description: Commit flag (true to commit) CommitResponse: type: object properties: ok: type: boolean CalcAdjRequest: type: object properties: cmpn: $ref: '#/components/schemas/CompanyData' inv: type: array items: $ref: '#/components/schemas/Invoice' adj: type: object properties: disc: type: integer description: Discount type adj: type: integer description: Adjustment method GeocodeRequest: type: object properties: ref: type: string description: Reference ID cass: type: boolean description: Whether to return CASS-certified address addr: type: string description: Street address city: type: string st: type: string description: State abbreviation zip: type: string description: ZIP code GeocodeResult: type: object properties: ref: type: string cass: type: object properties: addr: type: string city: type: string st: type: string zip: type: string cBlk: type: string description: Census block group cTrc: type: string description: Census tract err: type: string description: Error message if geocoding failed geo: type: boolean description: Whether geocoding was successful lat: type: number format: double long: type: number format: double pcd: type: integer description: PCode for the determined jurisdiction fips: type: string description: FIPS code TSPairModel: type: object properties: TransactionType: type: integer description: Transaction type ID TransactionTypeDescription: type: string ServiceType: type: integer description: Service type ID ServiceTypeDescription: type: string TaxProfile: type: object properties: profileId: type: integer profileName: type: string description: type: string bundles: type: array items: type: object properties: bundleId: type: integer bundleName: type: string Exclusion: type: object properties: excl: type: integer description: Exclusion type ctry: type: string st: type: string excl_name: type: string ServiceInfo: type: object properties: serverTime: type: string format: date-time buildVersion: type: string ErrorResponse: type: object properties: err: type: array items: type: object properties: code: type: integer msg: type: string