Unified SDK consists of services on top of which the Avalara Compliance Cloud platform is built. These services are foundational and provide functionality such as einvoicing.
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>net.avalara</groupId>
<artifactId>avalara-sdk</artifactId>
<version>24.12.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
implementation 'net.avalara:avalara-sdk:24.12.0'
}
Please follow the installation instruction and execute the following Java code:
import Avalara.SDK.*;
import Avalara.SDK.api.EInvoicing.V1.*;
import Avalara.SDK.model.EInvoicing.V1.*;
public class MandatesApiExample {
public static void main(String[] args) {
Configuration configuration = new Configuration();
configuration.setAppName("Test");
configuration.setAppVersion("1.0");
configuration.setMachineName("LocalBox");
configuration.setTimeout(5000);
configuration.setEnvironment(AvaTaxEnvironment.Sandbox);
// Configure OAuth2 access token for authorization
configuration.setBearerToken("YOUR ACCESS TOKEN");
try {
ApiClient apiClient = new ApiClient(configuration);
Avalara.SDK.api.EInvoicing.V1.MandatesApi apiInstance = new MandatesApi(apiClient);
String xAvalaraClient = "Swagger UI; 22.7.0; Custom; 1.0"; // String | 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/) .
MandatesApi.GetMandatesRequest request = apiInstance.getGetMandatesRequest();
request.setXAvalaraClient(xAvalaraClient);
MandatesResponse result = apiInstance.getMandates(request);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MandatesAPI#getMandates");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
}
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.
Class | Method | HTTP request | Description |
---|---|---|---|
DataInputFieldsApi | getDataInputFields | GET /data-input-fields | Returns the optionality of document fields for different country mandates |
DocumentsApi | downloadDocument | GET /documents/{documentId}/$download | Returns a copy of the document |
DocumentsApi | fetchDocuments | POST /documents/$fetch | Fetch the inbound document from a tax authority |
DocumentsApi | getDocumentList | GET /documents | Returns a summary of documents for a date range |
DocumentsApi | getDocumentStatus | GET /documents/{documentId}/status | Checks the status of a document |
DocumentsApi | submitDocument | POST /documents | Submits a document to Avalara E-Invoicing API |
InteropApi | submitInteropDocument | POST /interop/documents | Submit a document |
MandatesApi | getMandateDataInputFields | GET /mandates/{mandateId}/data-input-fields | Returns document field information for a country mandate, a selected document type, and its version |
MandatesApi | getMandates | GET /mandates | List country mandates that are supported by the Avalara E-Invoicing platform |
SubscriptionsApi | createWebhookSubscription | POST /webhooks/subscriptions | Create a subscription to events |
SubscriptionsApi | deleteWebhookSubscription | DELETE /webhooks/subscriptions/{subscription-id} | Unsubscribe from events |
SubscriptionsApi | getWebhookSubscription | GET /webhooks/subscriptions/{subscription-id} | Get details of a subscription |
SubscriptionsApi | listWebhookSubscriptions | GET /webhooks/subscriptions | List all subscriptions |
TaxIdentifiersApi | taxIdentifierSchemaByCountry | GET /tax-identifiers/schema | Returns the tax identifier request & response schema for a specific country. |
TaxIdentifiersApi | validateTaxIdentifier | POST /tax-identifiers/validate | Validates a tax identifier. |
TradingPartnersApi | batchSearchParticipants | POST /trading-partners/batch-searches | Handles batch search requests by uploading a file containing search parameters. |
TradingPartnersApi | createTradingPartner | POST /trading-partners | Creates a new trading partner. |
TradingPartnersApi | createTradingPartnersBatch | POST /trading-partners/batch | Creates a batch of multiple trading partners. |
TradingPartnersApi | deleteTradingPartner | DELETE /trading-partners/{id} | Deletes a trading partner using ID. |
TradingPartnersApi | downloadBatchSearchReport | GET /trading-partners/batch-searches/{id}/$download-results | Downloads batch search results in a csv file. |
TradingPartnersApi | getBatchSearchDetail | GET /trading-partners/batch-searches/{id} | Returns the batch search details using ID. |
TradingPartnersApi | listBatchSearches | GET /trading-partners/batch-searches | Lists all batch searches that were previously submitted. |
TradingPartnersApi | searchParticipants | GET /trading-partners | Returns a list of participants matching the input query. |
TradingPartnersApi | updateTradingPartner | PUT /trading-partners/{id} | Updates a trading partner using ID. |
Class | Method | HTTP request | Description |
---|---|---|---|
CompaniesW9Api | createCompany | POST /w9/companies | Create a company |
CompaniesW9Api | deleteCompany | DELETE /w9/companies/{id} | Delete a company |
CompaniesW9Api | getCompanies | GET /w9/companies | List companies |
CompaniesW9Api | getCompany | GET /w9/companies/{id} | Retrieve a company |
CompaniesW9Api | updateCompany | PUT /w9/companies/{id} | Update a company |
Forms1099Api | bulkUpsert1099Forms | POST /1099/forms/$bulk-upsert | Create or update multiple 1099/1095/W2/1042S forms |
Forms1099Api | create1099Form | POST /1099/forms | Create a 1099/1095/W2/1042S form |
Forms1099Api | delete1099Form | DELETE /1099/forms/{id} | Delete a 1099/1095/W2/1042S form |
Forms1099Api | get1099Form | GET /1099/forms/{id} | Retrieve a 1099/1095/W2/1042S form |
Forms1099Api | get1099FormPdf | GET /1099/forms/{id}/pdf | Retrieve the PDF file for a 1099/1095/W2/1042S form |
Forms1099Api | list1099Forms | GET /1099/forms | List 1099/1095/W2/1042S forms |
Forms1099Api | update1099Form | PUT /1099/forms/{id} | Update a 1099/1095/W2/1042S form |
FormsW9Api | createW9Form | POST /w9/forms | Create a W9/W4/W8 form |
FormsW9Api | deleteW9Form | DELETE /w9/forms/{id} | Delete a W9/W4/W8 form |
FormsW9Api | getW9Form | GET /w9/forms/{id} | Retrieve a W9/W4/W8 form |
FormsW9Api | listW9Forms | GET /w9/forms | List W9/W4/W8 forms |
FormsW9Api | sendW9FormEmail | POST /w9/forms/{id}/$send-email | Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form |
FormsW9Api | updateW9Form | PUT /w9/forms/{id} | Update a W9/W4/W8 form |
FormsW9Api | uploadW9Files | POST /w9/forms/{id}/attachment | Replace the PDF file for a W9/W4/W8 form |
Issuers1099Api | createIssuer | POST /1099/issuers | Create an issuer |
Issuers1099Api | deleteIssuer | DELETE /1099/issuers/{id} | Delete an issuer |
Issuers1099Api | getIssuer | GET /1099/issuers/{id} | Retrieve an issuer |
Issuers1099Api | getIssuers | GET /1099/issuers | List issuers |
Issuers1099Api | updateIssuer | PUT /1099/issuers/{id} | Update an issuer |
Jobs1099Api | getJob | GET /1099/jobs/{id} | Retrieves information about the job |
- Avalara.SDK.model.EInvoicing.V1.Address
- Avalara.SDK.model.EInvoicing.V1.BadDownloadRequest
- Avalara.SDK.model.EInvoicing.V1.BadRequest
- Avalara.SDK.model.EInvoicing.V1.BatchErrorDetail
- Avalara.SDK.model.EInvoicing.V1.BatchSearch
- Avalara.SDK.model.EInvoicing.V1.BatchSearchListResponse
- Avalara.SDK.model.EInvoicing.V1.BatchSearchParticipants202Response
- Avalara.SDK.model.EInvoicing.V1.ConditionalForField
- Avalara.SDK.model.EInvoicing.V1.Consents
- Avalara.SDK.model.EInvoicing.V1.CreateTradingPartner201Response
- Avalara.SDK.model.EInvoicing.V1.CreateTradingPartnersBatch200Response
- Avalara.SDK.model.EInvoicing.V1.CreateTradingPartnersBatch200ResponseValueInner
- Avalara.SDK.model.EInvoicing.V1.CreateTradingPartnersBatchRequest
- Avalara.SDK.model.EInvoicing.V1.DataInputField
- Avalara.SDK.model.EInvoicing.V1.DataInputFieldNotUsedFor
- Avalara.SDK.model.EInvoicing.V1.DataInputFieldOptionalFor
- Avalara.SDK.model.EInvoicing.V1.DataInputFieldRequiredFor
- Avalara.SDK.model.EInvoicing.V1.DataInputFieldsResponse
- Avalara.SDK.model.EInvoicing.V1.DocumentFetch
- Avalara.SDK.model.EInvoicing.V1.DocumentListResponse
- Avalara.SDK.model.EInvoicing.V1.DocumentStatusResponse
- Avalara.SDK.model.EInvoicing.V1.DocumentSubmissionError
- Avalara.SDK.model.EInvoicing.V1.DocumentSubmitResponse
- Avalara.SDK.model.EInvoicing.V1.DocumentSummary
- Avalara.SDK.model.EInvoicing.V1.ErrorResponse
- Avalara.SDK.model.EInvoicing.V1.EventId
- Avalara.SDK.model.EInvoicing.V1.EventMessage
- Avalara.SDK.model.EInvoicing.V1.EventPayload
- Avalara.SDK.model.EInvoicing.V1.EventSubscription
- Avalara.SDK.model.EInvoicing.V1.Extension
- Avalara.SDK.model.EInvoicing.V1.FetchDocumentsRequest
- Avalara.SDK.model.EInvoicing.V1.FetchDocumentsRequestDataInner
- Avalara.SDK.model.EInvoicing.V1.FetchDocumentsRequestMetadata
- Avalara.SDK.model.EInvoicing.V1.ForbiddenError
- Avalara.SDK.model.EInvoicing.V1.HmacSignature
- Avalara.SDK.model.EInvoicing.V1.HmacSignatureValue
- Avalara.SDK.model.EInvoicing.V1.Id
- Avalara.SDK.model.EInvoicing.V1.Identifier
- Avalara.SDK.model.EInvoicing.V1.InputDataFormats
- Avalara.SDK.model.EInvoicing.V1.InternalServerError
- Avalara.SDK.model.EInvoicing.V1.Mandate
- Avalara.SDK.model.EInvoicing.V1.MandateDataInputField
- Avalara.SDK.model.EInvoicing.V1.MandateDataInputFieldNamespace
- Avalara.SDK.model.EInvoicing.V1.MandatesResponse
- Avalara.SDK.model.EInvoicing.V1.NotFoundError
- Avalara.SDK.model.EInvoicing.V1.NotUsedForField
- Avalara.SDK.model.EInvoicing.V1.OutputDataFormats
- Avalara.SDK.model.EInvoicing.V1.Pagination
- Avalara.SDK.model.EInvoicing.V1.RequiredWhenField
- Avalara.SDK.model.EInvoicing.V1.SearchParticipants200Response
- Avalara.SDK.model.EInvoicing.V1.Signature
- Avalara.SDK.model.EInvoicing.V1.SignatureSignature
- Avalara.SDK.model.EInvoicing.V1.SignatureValue
- Avalara.SDK.model.EInvoicing.V1.SignatureValueSignature
- Avalara.SDK.model.EInvoicing.V1.StatusEvent
- Avalara.SDK.model.EInvoicing.V1.SubmitDocumentMetadata
- Avalara.SDK.model.EInvoicing.V1.SubmitInteropDocument202Response
- Avalara.SDK.model.EInvoicing.V1.SubscriptionCommon
- Avalara.SDK.model.EInvoicing.V1.SubscriptionDetail
- Avalara.SDK.model.EInvoicing.V1.SubscriptionListResponse
- Avalara.SDK.model.EInvoicing.V1.SubscriptionRegistration
- Avalara.SDK.model.EInvoicing.V1.SuccessResponse
- Avalara.SDK.model.EInvoicing.V1.SupportedDocumentTypes
- Avalara.SDK.model.EInvoicing.V1.TaxIdentifierRequest
- Avalara.SDK.model.EInvoicing.V1.TaxIdentifierResponse
- Avalara.SDK.model.EInvoicing.V1.TaxIdentifierResponseValue
- Avalara.SDK.model.EInvoicing.V1.TaxIdentifierSchemaByCountry200Response
- Avalara.SDK.model.EInvoicing.V1.TradingPartner
- Avalara.SDK.model.EInvoicing.V1.UpdateTradingPartner200Response
- Avalara.SDK.model.EInvoicing.V1.ValidationError
- Avalara.SDK.model.EInvoicing.V1.WebhookInvocation
- Avalara.SDK.model.EInvoicing.V1.WebhooksErrorInfo
- Avalara.SDK.model.EInvoicing.V1.WebhooksErrorResponse
- Avalara.SDK.model.EInvoicing.V1.WorkflowIds
- Avalara.SDK.model.A1099.V2.Attribute
- Avalara.SDK.model.A1099.V2.AuthorizedApiRequestModel
- Avalara.SDK.model.A1099.V2.AuthorizedApiRequestV2DataModel
- Avalara.SDK.model.A1099.V2.BaseCompanyModel
- Avalara.SDK.model.A1099.V2.BaseFormListRequest
- Avalara.SDK.model.A1099.V2.BulkUpsert1099FormsRequest
- Avalara.SDK.model.A1099.V2.CompanyCreateUpdateRequestModel
- Avalara.SDK.model.A1099.V2.CompanyModel
- Avalara.SDK.model.A1099.V2.CompanyResponse
- Avalara.SDK.model.A1099.V2.CompanyResponseModel
- Avalara.SDK.model.A1099.V2.CoveredIndividualReferenceResponse
- Avalara.SDK.model.A1099.V2.CoveredIndividualRequest
- Avalara.SDK.model.A1099.V2.Create1099Form201Response
- Avalara.SDK.model.A1099.V2.CreateW9Form201Response
- Avalara.SDK.model.A1099.V2.CreateW9FormRequest
- Avalara.SDK.model.A1099.V2.Data
- Avalara.SDK.model.A1099.V2.ErrorModel
- Avalara.SDK.model.A1099.V2.ErrorResponse
- Avalara.SDK.model.A1099.V2.ErrorResponseErrorsInner
- Avalara.SDK.model.A1099.V2.Form1042SList
- Avalara.SDK.model.A1099.V2.Form1042SListItem
- Avalara.SDK.model.A1099.V2.Form1042SListItemResponse
- Avalara.SDK.model.A1099.V2.Form1042SRequest
- Avalara.SDK.model.A1099.V2.Form1042SResponse
- Avalara.SDK.model.A1099.V2.Form1095BList
- Avalara.SDK.model.A1099.V2.Form1095BListItem
- Avalara.SDK.model.A1099.V2.Form1095BListItemResponse
- Avalara.SDK.model.A1099.V2.Form1095BRequest
- Avalara.SDK.model.A1099.V2.Form1095CList
- Avalara.SDK.model.A1099.V2.Form1095CListItem
- Avalara.SDK.model.A1099.V2.Form1099BaseResponse
- Avalara.SDK.model.A1099.V2.Form1099DivList
- Avalara.SDK.model.A1099.V2.Form1099DivListItem
- Avalara.SDK.model.A1099.V2.Form1099DivListItemResponse
- Avalara.SDK.model.A1099.V2.Form1099DivRequest
- Avalara.SDK.model.A1099.V2.Form1099DivResponse
- Avalara.SDK.model.A1099.V2.Form1099KList
- Avalara.SDK.model.A1099.V2.Form1099KListItem
- Avalara.SDK.model.A1099.V2.Form1099KListItemResponse
- Avalara.SDK.model.A1099.V2.Form1099KRequest
- Avalara.SDK.model.A1099.V2.Form1099KResponse
- Avalara.SDK.model.A1099.V2.Form1099ListResponse
- Avalara.SDK.model.A1099.V2.Form1099ListResponseValueInner
- Avalara.SDK.model.A1099.V2.Form1099MiscList
- Avalara.SDK.model.A1099.V2.Form1099MiscListItem
- Avalara.SDK.model.A1099.V2.Form1099MiscListItemResponse
- Avalara.SDK.model.A1099.V2.Form1099MiscRequest
- Avalara.SDK.model.A1099.V2.Form1099MiscResponse
- Avalara.SDK.model.A1099.V2.Form1099NecList
- Avalara.SDK.model.A1099.V2.Form1099NecListItem
- Avalara.SDK.model.A1099.V2.Form1099NecListItemResponse
- Avalara.SDK.model.A1099.V2.Form1099NecRequest
- Avalara.SDK.model.A1099.V2.Form1099NecResponse
- Avalara.SDK.model.A1099.V2.Form1099ProccessResult
- Avalara.SDK.model.A1099.V2.Form1099RList
- Avalara.SDK.model.A1099.V2.Form1099RListItem
- Avalara.SDK.model.A1099.V2.Form1099RListItemResponse
- Avalara.SDK.model.A1099.V2.Form1099RRequest
- Avalara.SDK.model.A1099.V2.FormRequestBase
- Avalara.SDK.model.A1099.V2.FormRequestListItemBase
- Avalara.SDK.model.A1099.V2.FormResponseBase
- Avalara.SDK.model.A1099.V2.FormSingleRequestBase
- Avalara.SDK.model.A1099.V2.Get1099Form200Response
- Avalara.SDK.model.A1099.V2.HttpValidationProblemDetails
- Avalara.SDK.model.A1099.V2.ICreateForm1099Request
- Avalara.SDK.model.A1099.V2.IUpdateForm1099Request
- Avalara.SDK.model.A1099.V2.IW9FormDataModelsOneOf
- Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough
- Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughRequest
- Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughResponse
- Avalara.SDK.model.A1099.V2.IrsResponse
- Avalara.SDK.model.A1099.V2.IssuerCommand
- Avalara.SDK.model.A1099.V2.IssuerResponse
- Avalara.SDK.model.A1099.V2.JobResult
- Avalara.SDK.model.A1099.V2.Link
- Avalara.SDK.model.A1099.V2.OfferAndCoverageRequest
- Avalara.SDK.model.A1099.V2.PaginatedQueryResultModel
- Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelCompanyResponse
- Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelIssuerResponse
- Avalara.SDK.model.A1099.V2.PaginatedW9FormsModel
- Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgent
- Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentRequest
- Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentResponse
- Avalara.SDK.model.A1099.V2.ProblemDetails
- Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest
- Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse
- Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse
- Avalara.SDK.model.A1099.V2.StatusDetail
- Avalara.SDK.model.A1099.V2.SubstantialUsOwnerRequest
- Avalara.SDK.model.A1099.V2.SubstantialUsOwnerResponse
- Avalara.SDK.model.A1099.V2.TinMatchStatusResponse
- Avalara.SDK.model.A1099.V2.Update1099Form200Response
- Avalara.SDK.model.A1099.V2.ValidationErrorResponse
- Avalara.SDK.model.A1099.V2.W4FormDataModel
- Avalara.SDK.model.A1099.V2.W4FormRequest
- Avalara.SDK.model.A1099.V2.W4FormResponse
- Avalara.SDK.model.A1099.V2.W8BenEFormRequest
- Avalara.SDK.model.A1099.V2.W8BenEFormResponse
- Avalara.SDK.model.A1099.V2.W8BenESubstantialUsOwnerDataModel
- Avalara.SDK.model.A1099.V2.W8BenFormDataModel
- Avalara.SDK.model.A1099.V2.W8BenFormRequest
- Avalara.SDK.model.A1099.V2.W8BenFormResponse
- Avalara.SDK.model.A1099.V2.W8BeneFormDataModel
- Avalara.SDK.model.A1099.V2.W8ImyFormDataModel
- Avalara.SDK.model.A1099.V2.W8ImyFormRequest
- Avalara.SDK.model.A1099.V2.W8ImyFormResponse
- Avalara.SDK.model.A1099.V2.W9FormBaseRequest
- Avalara.SDK.model.A1099.V2.W9FormBaseResponse
- Avalara.SDK.model.A1099.V2.W9FormDataModel
- Avalara.SDK.model.A1099.V2.W9FormRequest
- Avalara.SDK.model.A1099.V2.W9FormResponse