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.
- .NET Core >=1.0
- .NET Framework >=4.6
- Json.NET - 13.0.1 or later
- JsonSubTypes - 1.8.0 or later
- Polly - 7.2.2 or later
- System.ComponentModel.Annotations - 5.0.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations
using System;
using Avalara.SDK.Client;
using Avalara.SDK.Helpers;
using Avalara.SDK.Api.EInvoicing.V1;
using System.Threading.Tasks;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration configuration = new Configuration
{
Environment = AvalaraEnvironment.Sandbox,
BearerToken = Environment.GetEnvironmentVariable("BEARER_TOKEN"), // Your Bearer token to connect to Avalara
AppName = "Test",
AppVersion = "1.0",
MachineName = "LocalBox"
};
ApiClient apiClient = new ApiClient(configuration);
var mandatesApi = new MandatesApi(apiClient);
var requestParameters = new GetMandatesRequest();
requestParameters.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/) . (optional) (default to "Swagger UI; 22.7.0; Custom; 1.0")
try
{
// Retrieve the list of Mandates
var response = await mandatesApi.GetMandatesAsync(requestParameters);
Debug.WriteLine(response);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AddressesApi.ResolveAddressPost: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
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 |
- Model.EInvoicing.V1.Address
- Model.EInvoicing.V1.BadDownloadRequest
- Model.EInvoicing.V1.BadRequest
- Model.EInvoicing.V1.BatchErrorDetail
- Model.EInvoicing.V1.BatchSearch
- Model.EInvoicing.V1.BatchSearchListResponse
- Model.EInvoicing.V1.BatchSearchParticipants202Response
- Model.EInvoicing.V1.ConditionalForField
- Model.EInvoicing.V1.Consents
- Model.EInvoicing.V1.CreateTradingPartner201Response
- Model.EInvoicing.V1.CreateTradingPartnersBatch200Response
- Model.EInvoicing.V1.CreateTradingPartnersBatch200ResponseValueInner
- Model.EInvoicing.V1.CreateTradingPartnersBatchRequest
- Model.EInvoicing.V1.DataInputField
- Model.EInvoicing.V1.DataInputFieldNotUsedFor
- Model.EInvoicing.V1.DataInputFieldOptionalFor
- Model.EInvoicing.V1.DataInputFieldRequiredFor
- Model.EInvoicing.V1.DataInputFieldsResponse
- Model.EInvoicing.V1.DocumentFetch
- Model.EInvoicing.V1.DocumentListResponse
- Model.EInvoicing.V1.DocumentStatusResponse
- Model.EInvoicing.V1.DocumentSubmissionError
- Model.EInvoicing.V1.DocumentSubmitResponse
- Model.EInvoicing.V1.DocumentSummary
- Model.EInvoicing.V1.ErrorResponse
- Model.EInvoicing.V1.EventId
- Model.EInvoicing.V1.EventMessage
- Model.EInvoicing.V1.EventPayload
- Model.EInvoicing.V1.EventSubscription
- Model.EInvoicing.V1.Extension
- Model.EInvoicing.V1.FetchDocumentsRequest
- Model.EInvoicing.V1.FetchDocumentsRequestDataInner
- Model.EInvoicing.V1.FetchDocumentsRequestMetadata
- Model.EInvoicing.V1.ForbiddenError
- Model.EInvoicing.V1.HmacSignature
- Model.EInvoicing.V1.HmacSignatureValue
- Model.EInvoicing.V1.Id
- Model.EInvoicing.V1.Identifier
- Model.EInvoicing.V1.InputDataFormats
- Model.EInvoicing.V1.InternalServerError
- Model.EInvoicing.V1.Mandate
- Model.EInvoicing.V1.MandateDataInputField
- Model.EInvoicing.V1.MandateDataInputFieldNamespace
- Model.EInvoicing.V1.MandatesResponse
- Model.EInvoicing.V1.NotFoundError
- Model.EInvoicing.V1.NotUsedForField
- Model.EInvoicing.V1.OutputDataFormats
- Model.EInvoicing.V1.Pagination
- Model.EInvoicing.V1.RequiredWhenField
- Model.EInvoicing.V1.SearchParticipants200Response
- Model.EInvoicing.V1.Signature
- Model.EInvoicing.V1.SignatureSignature
- Model.EInvoicing.V1.SignatureValue
- Model.EInvoicing.V1.SignatureValueSignature
- Model.EInvoicing.V1.StatusEvent
- Model.EInvoicing.V1.SubmitDocumentMetadata
- Model.EInvoicing.V1.SubmitInteropDocument202Response
- Model.EInvoicing.V1.SubscriptionCommon
- Model.EInvoicing.V1.SubscriptionDetail
- Model.EInvoicing.V1.SubscriptionListResponse
- Model.EInvoicing.V1.SubscriptionRegistration
- Model.EInvoicing.V1.SuccessResponse
- Model.EInvoicing.V1.SupportedDocumentTypes
- Model.EInvoicing.V1.TaxIdentifierRequest
- Model.EInvoicing.V1.TaxIdentifierResponse
- Model.EInvoicing.V1.TaxIdentifierResponseValue
- Model.EInvoicing.V1.TaxIdentifierSchemaByCountry200Response
- Model.EInvoicing.V1.TradingPartner
- Model.EInvoicing.V1.UpdateTradingPartner200Response
- Model.EInvoicing.V1.ValidationError
- Model.EInvoicing.V1.WebhookInvocation
- Model.EInvoicing.V1.WebhooksErrorInfo
- Model.EInvoicing.V1.WebhooksErrorResponse
- Model.EInvoicing.V1.WorkflowIds
- Model.A1099.V2.Attribute
- Model.A1099.V2.AuthorizedApiRequestModel
- Model.A1099.V2.AuthorizedApiRequestV2DataModel
- Model.A1099.V2.BaseCompanyModel
- Model.A1099.V2.BaseFormListRequest
- Model.A1099.V2.BulkUpsert1099FormsRequest
- Model.A1099.V2.CompanyCreateUpdateRequestModel
- Model.A1099.V2.CompanyModel
- Model.A1099.V2.CompanyResponse
- Model.A1099.V2.CompanyResponseModel
- Model.A1099.V2.CoveredIndividualReferenceResponse
- Model.A1099.V2.CoveredIndividualRequest
- Model.A1099.V2.Create1099Form201Response
- Model.A1099.V2.CreateW9Form201Response
- Model.A1099.V2.CreateW9FormRequest
- Model.A1099.V2.Data
- Model.A1099.V2.ErrorModel
- Model.A1099.V2.ErrorResponse
- Model.A1099.V2.ErrorResponseErrorsInner
- Model.A1099.V2.Form1042SList
- Model.A1099.V2.Form1042SListItem
- Model.A1099.V2.Form1042SListItemResponse
- Model.A1099.V2.Form1042SRequest
- Model.A1099.V2.Form1042SResponse
- Model.A1099.V2.Form1095BList
- Model.A1099.V2.Form1095BListItem
- Model.A1099.V2.Form1095BListItemResponse
- Model.A1099.V2.Form1095BRequest
- Model.A1099.V2.Form1095CList
- Model.A1099.V2.Form1095CListItem
- Model.A1099.V2.Form1099BaseResponse
- Model.A1099.V2.Form1099DivList
- Model.A1099.V2.Form1099DivListItem
- Model.A1099.V2.Form1099DivListItemResponse
- Model.A1099.V2.Form1099DivRequest
- Model.A1099.V2.Form1099DivResponse
- Model.A1099.V2.Form1099KList
- Model.A1099.V2.Form1099KListItem
- Model.A1099.V2.Form1099KListItemResponse
- Model.A1099.V2.Form1099KRequest
- Model.A1099.V2.Form1099KResponse
- Model.A1099.V2.Form1099ListResponse
- Model.A1099.V2.Form1099ListResponseValueInner
- Model.A1099.V2.Form1099MiscList
- Model.A1099.V2.Form1099MiscListItem
- Model.A1099.V2.Form1099MiscListItemResponse
- Model.A1099.V2.Form1099MiscRequest
- Model.A1099.V2.Form1099MiscResponse
- Model.A1099.V2.Form1099NecList
- Model.A1099.V2.Form1099NecListItem
- Model.A1099.V2.Form1099NecListItemResponse
- Model.A1099.V2.Form1099NecRequest
- Model.A1099.V2.Form1099NecResponse
- Model.A1099.V2.Form1099ProccessResult
- Model.A1099.V2.Form1099RList
- Model.A1099.V2.Form1099RListItem
- Model.A1099.V2.Form1099RListItemResponse
- Model.A1099.V2.Form1099RRequest
- Model.A1099.V2.FormRequestBase
- Model.A1099.V2.FormRequestListItemBase
- Model.A1099.V2.FormResponseBase
- Model.A1099.V2.FormSingleRequestBase
- Model.A1099.V2.Get1099Form200Response
- Model.A1099.V2.HttpValidationProblemDetails
- Model.A1099.V2.ICreateForm1099Request
- Model.A1099.V2.IUpdateForm1099Request
- Model.A1099.V2.IW9FormDataModelsOneOf
- Model.A1099.V2.IntermediaryOrFlowThrough
- Model.A1099.V2.IntermediaryOrFlowThroughRequest
- Model.A1099.V2.IntermediaryOrFlowThroughResponse
- Model.A1099.V2.IrsResponse
- Model.A1099.V2.IssuerCommand
- Model.A1099.V2.IssuerResponse
- Model.A1099.V2.JobResult
- Model.A1099.V2.Link
- Model.A1099.V2.OfferAndCoverageRequest
- Model.A1099.V2.PaginatedQueryResultModel
- Model.A1099.V2.PaginatedQueryResultModelCompanyResponse
- Model.A1099.V2.PaginatedQueryResultModelIssuerResponse
- Model.A1099.V2.PaginatedW9FormsModel
- Model.A1099.V2.PrimaryWithholdingAgent
- Model.A1099.V2.PrimaryWithholdingAgentRequest
- Model.A1099.V2.PrimaryWithholdingAgentResponse
- Model.A1099.V2.ProblemDetails
- Model.A1099.V2.StateAndLocalWithholdingRequest
- Model.A1099.V2.StateAndLocalWithholdingResponse
- Model.A1099.V2.StateEfileStatusDetailResponse
- Model.A1099.V2.StatusDetail
- Model.A1099.V2.SubstantialUsOwnerRequest
- Model.A1099.V2.SubstantialUsOwnerResponse
- Model.A1099.V2.TinMatchStatusResponse
- Model.A1099.V2.Update1099Form200Response
- Model.A1099.V2.ValidationErrorResponse
- Model.A1099.V2.W4FormDataModel
- Model.A1099.V2.W4FormRequest
- Model.A1099.V2.W4FormResponse
- Model.A1099.V2.W8BenEFormRequest
- Model.A1099.V2.W8BenEFormResponse
- Model.A1099.V2.W8BenESubstantialUsOwnerDataModel
- Model.A1099.V2.W8BenFormDataModel
- Model.A1099.V2.W8BenFormRequest
- Model.A1099.V2.W8BenFormResponse
- Model.A1099.V2.W8BeneFormDataModel
- Model.A1099.V2.W8ImyFormDataModel
- Model.A1099.V2.W8ImyFormRequest
- Model.A1099.V2.W8ImyFormResponse
- Model.A1099.V2.W9FormBaseRequest
- Model.A1099.V2.W9FormBaseResponse
- Model.A1099.V2.W9FormDataModel
- Model.A1099.V2.W9FormRequest
- Model.A1099.V2.W9FormResponse