openapi: 3.1.0
info:
title: Avalara Reports API
version: '1.0'
description: 'Operations tagged Reports across 2 of this provider''s published API definitions: avalara-avatax-rest-openapi.yml, avatax-apis-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://rest.avatax.com
description: AvaTax Production
- url: https://sandbox-rest.avatax.com
description: AvaTax Sandbox
- url: http://{{baseurl}}
tags:
- name: Reports
description: Generate and retrieve tax reports
paths:
/api/v2/companies/{companyId}/reports:
servers:
- url: https://rest.avatax.com
description: AvaTax Production
- url: https://sandbox-rest.avatax.com
description: AvaTax Sandbox
get:
operationId: listReports
summary: Avalara List Reports for a Company
tags:
- Reports
parameters:
- $ref: '#/components/parameters/companyId'
responses:
'200':
description: List of reports
security:
- basicAuth: []
- bearerAuth: []
/api/v2/reports/{id}:
servers:
- url: https://rest.avatax.com
description: AvaTax Production
- url: https://sandbox-rest.avatax.com
description: AvaTax Sandbox
get:
operationId: getReport
summary: Avalara Retrieve a Single Report
tags:
- Reports
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
'200':
description: Report details
security:
- basicAuth: []
- bearerAuth: []
/api/v2/reports/{id}/attachment:
servers:
- url: http://{{baseurl}}
get:
tags:
- Reports
summary: Avalara DownloadReport
description: "This API downloads the file associated with a report.\n \nIf the report is not yet complete, you will receive a `ReportNotFinished` error. To check if a report is complete,\nuse the `GetReport` API.\n \nReports are run as asynchronous report tasks on the server. When complete, the report file will be available for download\nfor up to 30 days after completion. To run an asynchronous report, you should follow these steps:\n \n* Begin a report by calling the report's Initiate API. There is a separate initiate API call for each report type.\n* In the result of the Initiate API, you receive back a report's `id` value.\n* Check the status of a report by calling `GetReport` and passing in the report's `id` value.\n* When a report's status is `Completed`, call `DownloadReport` to retrieve the file.\n \n* We throttle this API. You can only call this API up to 5 times in a minute.\n\n### Security Policies\n\n* This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.\n"
parameters:
- name: X-Avalara-Client
in: header
schema:
type: string
description: Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/).
example: AvaTax Postman Collection
- name: id
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
security:
- basicAuth: []
/api/v2/companies/{companyId}/reports/exportdocumentline/initiate:
servers:
- url: http://{{baseurl}}
post:
tags:
- Reports
summary: Avalara InitiateExportDocumentLineReport
description: "Begins running an `ExportDocumentLine` report task and returns the identity of the report.\n \nReports are run as asynchronous report tasks on the server. When complete, the report file will be available for download\nfor up to 30 days after completion. To run an asynchronous report, you should follow these steps:\n \n* Begin a report by calling the report's Initiate API. There is a separate initiate API call for each report type.\n* In the result of the Initiate API, you receive back a report's `id` value.\n* Check the status of a report by calling `GetReport` and passing in the report's `id` value.\n* When a report's status is `Completed`, call `DownloadReport` to retrieve the file.\n \nThe `ExportDocumentLine` report produces information about invoice lines recorded within your account.\n \nTo split large reports into multiple smaller partitions, use the numberOfPartitions and partition properties on ExportDocumentLineModel.\n \nExample - split a report into three partitions\n \n* Follow the steps above with numberOfPartitions = 3 and partition = 0\n* Follow the steps above with numberOfPartitions = 3 and partition = 1\n* Follow the steps above with numberOfPartitions = 3 and partition = 2\n* Once all three reports are downloaded merge the files on the client side.\n\n### Security Policies\n\n* This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.\n"
requestBody:
content:
application/json:
schema:
type: object
example:
format: CSV
startDate: '2023-07-13T00:00:00+00:00'
endDate: '2023-08-13T00:00:00+00:00'
country: US
state: All
dateFilter: DocumentDate
docType: Sales
currencyCode: USD
numberOfPartitions: 10
partition: 0
isLocked: true
merchantSellerIdentifier: abc,xyz
documentStatus: Committed
isModifiedDateSameAsDocumentDate: false
taxGroup: Alcohol
taxName: VAT
taxCode: '123'
taxSubType: Prepared Food and Beverage
reportSource: SNOWFLAKE
compression: NONE
includeDocumentLineDetails: false
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: X-Avalara-Client
in: header
schema:
type: string
description: Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/).
example: AvaTax Postman Collection
- name: companyId
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
security:
- basicAuth: []
/api/v2/reports:
servers:
- url: http://{{baseurl}}
get:
tags:
- Reports
summary: Avalara ListReports
description: "List all report tasks for your account.\n \nReports are run as asynchronous report tasks on the server. When complete, the report file will be available for download\nfor up to 30 days after completion. To run an asynchronous report, you should follow these steps:\n \n* Begin a report by calling the report's Initiate API. There is a separate initiate API call for each report type.\n* In the result of the Initiate API, you receive back a report's `id` value.\n* Check the status of a report by calling `GetReport` and passing in the report's `id` value.\n* When a report's status is `Completed`, call `DownloadReport` to retrieve the file.\n \nThis API call returns information about all report types across your entire account.\n\n### Security Policies\n\n* This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.\n"
parameters:
- name: X-Avalara-Client
in: header
schema:
type: string
description: Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/).
example: AvaTax Postman Collection
responses:
'200':
description: Successful response
content:
application/json: {}
security:
- basicAuth: []
components:
parameters:
companyId:
name: companyId
in: path
required: true
schema:
type: integer
description: The numeric ID of the company
securitySchemes:
basicAuth:
type: http
scheme: basic
description: Use your AvaTax username/password or accountId/licenseKey as basic auth credentials
bearerAuth:
type: http
scheme: bearer
description: OAuth 2.0 bearer token
externalDocs:
description: AvaTax REST API v2 Documentation
url: https://developer.avalara.com/api-reference/avatax/rest/v2/
x-refined-from:
- avalara-avatax-rest-openapi.yml
- avatax-apis-openapi.yml