Evaluate Transactions

Evaluate Transactions

NOTE: All the URL paths listed here are relative to https://{DevHub host}/ on Sandbox Environment and relative to https://{S1 host}/ on Production Environment.

NOTE: Users of the Sandbox Environment should remove the /api/basic-auth prefix for all URL paths listed below.

Users can send a request to calculate tax on a transaction. Issuing an Evaluate transaction call will calculate taxes on the transaction but will not maintain (persist) the request information or the response. This call is used to confirm tax liability on an invoice received from a vendor, or for testing purposes.

HTTP Request

Evaluate

POST /api/pre-auth/simple-connect-ap/v1/transactions?state=EVALUATE 

Header Parameters

  • Content-Type: (Required) Acceptable values are application/xml or application/json.
  • x-request-date: (Required for the HMAC authentication schema) Current request date in ISO 8601 format (yyyy-MM-ddTHH:mm:ss.SSSZ). For more information, see Authentication.
  • Authentication: (Required) Standard Basic-based string for Sandbox environment, and HMAC-based schema for Production environment. For more information, see Authentication.
  • x-request-id: (Optional) Client-generated request ID.
  • x-implementer-id: (Optional) External implementer ID.

The following information provides a detailed overview of Sovos Simple Connect API – AP evaluate request and response fields.

Body Parameters

Header Fields

If a transaction is sent via XML, every field should be inside of a transaction tag.

FieldDescriptionData TypeRestrictions
purchaseNumberTransaction’s document number.StringMin: 3 characters,
Max: 40 characters
purchaseDateTransaction’s document date default value; current date in UTC.String – DateDate format:
yyyy-MM-dd
currencyCodeTransaction’s currency code. Default value when null is USD.String
taxDirection1. FORWARD: Forward tax calculation.
2. BACKWARD: Backward tax calculation.
Default value when null: FORWARD.
String – EnumAccepted values: FORWARD/BACKWARD
vendorIDDefault value if line vendorId is null.StringMin: 3 characters,
MAX: 40 characters
exemptionReasonCodeDefault value if line exemptionReasonCode is null.
deliveryAmountTransaction’s header level delivery amount.BigDecimalMax 20 digits
Max 8 digits
billToDefault value if line billTo value is null.Object – Address
shipToDefault value if line shipTo value is null.Object – Address
shipFromDefault value if line shipFrom value is null.Object – Address
discountXML discount element only (use discounts field for JSON); list of discounts applied to the entire transaction.List – DiscountXML only. Limit of 5 discounts that can be applied to a transaction.
discountsJSON discount field only (use discount element for XML); list of discounts applied to the entire transaction.List – DiscountJSON only. Limit of 5 discounts that can be applied to a transaction.
buyerRegistrationNumberXML registration element only (use buyerRegistrationNumbers field in JSON); list of line registration number value is null.List – RegistrationXML only
buyerRegistrationNumbersJSON registration number field only (use buyerRegistrationNumber element in XML); list of registration objects. Default value if line registration value is null.List – RegistrationJSON only
sellerRegistrationNumberXML registration number element only (use sellerRegistrationNumbers field in JSON); list of registration objects. Default value if line registration number value is null.List – RegistrationXML only
sellerRegistrationNumbersJSON registration number field only (use sellerRegistrationNumber element in XML); list of registration objects. Default value if line registration value is null.List – RegistrationJSON only
thirdPartyRegistrationNumberXML registration number element only (use thirdPartyRegistrationNumbers field in JSON); list of registration objects. Default value if line registration number value is null.List – RegistrationXML only
thirdPartyRegistrationNumbersJSON registration number field only (use thirdPartyRegistrationNumber element in XML); list of registration objects. Default value if line registration value is null.List – RegistrationJSON only
lineItemXML line item element only (use lineItems field in JSON); list of line items associated with the transaction.List – LineItemXML only. Limit X number of line items.
lineItemsJSON line item field only (use lineItem element in XML); list of line items associated with the transaction.List – LineItemJSON only. Limit X number of line items.

Line Item Request Fields

FieldDescriptionData TypeRestrictions
identifierLine item identifier.StringMin: 1 character,
Max: 40 characters
goodServiceCodeLine item product code.StringMin: 3 characters,
Max: 40 characters
descriptionLine item product description.StringMin: 3 characters,
MAX: 40 characters
grossAmountLine item gross amount.BigDecimalMax 20 digits
Max 8 digits
vendorCodeLine item purchased from vendor.StringMin: 3 characters,
Max: 40 characters
exemptionReasonCodeLine item customer exemption reason code.StringMin: 3 characters,
Max: 40 characters
deliveryAmountLine item delivery amount.BigDecimalMax 20 digits
Max 8 digits
deliveryDateDate the item will be delivered.String – DateDate format: yyyy-MM-dd
quantityQuantity of item purchased.BigDecimalMax 20 digits
Max 8 digits
billToAddress to which the purchase will be billed.Address
shipToAddress to which the item will be shipped.Address
shipFromAddress from which the item will be shipped.Address
discountXML discount element only (use discounts List – DiscountXML only. Limit of 5 discounts that can be applied to a transaction.
discountsXML discount field only (use discount element in XML); list of discounts applied to entire transaction.List – DiscountJSON only. Limit of 5 discounts that can be applied to a transaction.
buyerRegistrationNumberXML registration number element only (use buyerRegistrationNumbers field in JSON); list of registration objects.List – RegistrationXML only
buyerRegistrationNumbersJSON registration number field only (use buyerRegistrationNumber element in XML); list of registration objects.List – RegistrationJSON only
sellerRegistrationNumberXML registration element only (use sellerRegistrationNumbers field in JSON); list of registration objects.List – RegistrationXML only
sellerRegistrationNumbersJSON registration number field only (use sellerRegistrationNumbers element in XML); list of registration objects.List – RegistrationJSON only
thirdPartyRegistrationNumberXML registration number element only (use thirdPartyRegistrationNumbers field in JSON); list of registration objects.List – Registration
thirdPartyRegistrationNumbersJSON registration number field only (use thirdPartyRegistrationNumber field in JSON); list of registration objects.List – Registration

Discount Request Fields

FieldDescriptionData TypeRestrictions
amountAmount of discount to be applied. Will default to standard discount and adjust gross amount.BigDecimalMax 20 digits
Max 8 digits
typeType of discount to be applied will default to standard discount and adjust
gross amount.
StringMin 3 characters
Max 1,000 characters

Registration Number Request Fields

FieldDescrtiptionData TypeRestrictions
countryRegistration country.String
statusStatus of the registration. Acceptable values:
IDENTIFIED
ESTABLISHED (default value)
DISTANCE_SALES
SPECIAL_SCHEME
VOLUNTARY_USE_TAX
ESTABLISHED_UNION_SCHEME (EU only)
String – Enum
jurisdictionTypeType of jurisdiction for the given registration. Acceptable values:
COUNTRY (default value)
STATE
COUNTY
CITY
DISTRICT
DISTRICT 2
String – Enum
numberRegistration number.String

Address Request Fields

FieldDescriptionData TypeRestrictions
addressStreet addressStringMax: 40 characters
cityMunicipalityCityStringMax: 40 characters
countyCountyStringMax: 40 characters
stateProvinceState or ProvinceStringMax: 40 characters
zipPostalCodeBase postal codeStringMax: 5 characters
zipPostalCodeExtensionPostal code extensionStringMax: 4 characters
countryCountryStringMax: 40 characters

Response Fields

Header Fields

The following fields will be inside of a response tag.

FieldDescriptionData TypeRestrictions
statusHTTP status code.Integer
messageGeneral response message.String
dataMain calculation response data.Object – Invoice

Invoice Fields

FieldDescriptionData TypeRestrictions
transactionIdTransaction ID; used for altering transactional state.String
purchaseNumberTransaction purchase number.String
currencyCodeTransaction currency code.String
invoiceDateTransaction invoice date.String – Date
customerCodeTransaction customer ID.String
totalTaxAmountTransaction order total tax amount.BigDecimal
billToCleansed transaction request address (if enabled).Object – Address
shipToCleansed transaction request address (if enabled).Object – Address
shipFromCleansed transaction request address (if enabled).Object – Address
lineItemsLine item responses.List – LineItem

Line Item Fields

FieldDescriptionData TypeRestrictions
identifierLine item identifier.String
billToCleansed transaction request address (if enabled).Object – Address
shipToCleansed transaction request address (if enabled).Object – Address
shipFromCleansed transaction request address (if enabled).Object – Address
totalTaxAmountLine item total tax amount.BigDecimal
taxInfoTax information associated with the line item.List – TaxInfo

Tax Information Fields

FieldDescriptionData TypeRestrictions
typeType of tax for the passed transaction.
Possible values:
COUNTRY
STATE
COUNTY
CITY
DISTRICT
DISTRICT 2
String – ENUM
jurisdictionTypeType of jurisdiction for the passed transaction. Possible values:
COUNTRY
STATE
COUNTY
CITY
DISTRICT
DISTRICT 2
String – ENUM
authorityNameTaxing jurisdiction authority name.String
cityOrCountyOrDistrictCity/County/District associated with taxing jurisdiction.String
stateOrProvinceState or Province associated with taxing jurisdiction.String
countryCountry associated with taxing jurisdiction.String
taxAmountTax amount for the specific jurisdiction.BigDecimal
taxRateTax rate or the specified jurisdiction.BigDecimal
exemptAmountExemption amount for the specified jurisdiction.BigDecimal
taxableAmountTaxable amount for the specified jurisdiction.BigDecimal
messagesMessages sent by the taxing jurisdiction authority.String – List