Avalara HS Codes API

Retrieve HS Code classification results

Documentation

Specifications

OpenAPI Specification

avalara-hs-codes-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Avalara Item Classification HS Codes API
  description: The Avalara Item Classification API allows businesses subscribed to the Item Classification service to submit products for automated classification, retrieve corresponding HS Codes, and manage classification requests. It supports both storage and non-storage subscription models for product classification across international trade jurisdictions.
  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
servers:
- url: https://api.avalara.com/classification/v2
  description: Item Classification API Production
- url: https://api.sbx.avalara.com/classification/v2
  description: Item Classification API Sandbox
security:
- bearerAuth: []
tags:
- name: HS Codes
  description: Retrieve HS Code classification results
paths:
  /classification-requests/{requestId}/results:
    get:
      operationId: getClassificationResults
      summary: Avalara Get Classification Results
      description: Retrieves the HS Code classification results for a completed classification request.
      tags:
      - HS Codes
      parameters:
      - name: requestId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Classification results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassificationResultList'
  /hs-codes/{hsCode}:
    get:
      operationId: getHSCodeDetails
      summary: Avalara Get HS Code Details
      description: Retrieves detailed information for a specific HS Code.
      tags:
      - HS Codes
      parameters:
      - name: hsCode
        in: path
        required: true
        schema:
          type: string
        description: The HS Code to look up
      - name: country
        in: query
        schema:
          type: string
        description: ISO 3166-1 alpha-2 country code for country-specific details
      responses:
        '200':
          description: HS Code details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HSCodeDetail'
components:
  schemas:
    ClassificationResultList:
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/ClassificationResult'
    HSCodeDetail:
      type: object
      properties:
        hsCode:
          type: string
        description:
          type: string
        chapter:
          type: string
        section:
          type: string
        parentCode:
          type: string
        dutyRate:
          type: string
        unitOfMeasure:
          type: string
    ClassificationResult:
      type: object
      properties:
        itemCode:
          type: string
        description:
          type: string
        hsCode:
          type: string
          description: Classified HS Code
        hsCodeDescription:
          type: string
        confidence:
          type: number
          format: double
          description: Classification confidence score (0-1)
        country:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.0 bearer token
externalDocs:
  description: Item Classification API Documentation
  url: https://developer.avalara.com/api-reference/item-classification/v2/