home

Indirect Tax

Sovos Docs

HTTP status codes

Sovos uses standard HTTP response codes to indicate the outcome of API requests, ranging from successful operations to client-side and server-side errors.

HTTP response codes fall into the following categories:

200 range
These codes mean success.
400 range
These codes suggest a client-side error due to the information provided. This could be a required parameter that is missing or an error in the Standard Business Document.
500 range codes
Indicate issues related to the Sovos’ servers, governmental credentials, or the network.

These response codes are incorporated into each JSON response message, which also includes a description, a Unix timestamp, and potentially any output files as part of an application response. If there are errors, the response will also include a standardized subCode explaining what to do to fix them.

Indirect Tax API supports the following HTTP status codes:

HTTP Status CodeNameDescription
200OKThe API request was received and processed successfully (synchronous transaction).
202AcceptedThe API request was received and is in progress (asynchronous transaction).
207Multi-StatusMultiple operations have occurred. See the status of each operation in the response body.
400Bad RequestThe server could not accept the request. This is often because the request missed a required parameter.
401UnauthorizedNo valid API key or token provided.
403Forbidden The API key doesn't have permissions to perform the request.
404Not FoundThe requested resource doesn't exist.
405Method Not AllowedThe server does not allow the executed method.
408Request TimeoutThe server didn't receive a request from the client within an acceptable time limit.
409Conflict The request conflicts with another request, often due to duplicate documents.
429Too Many RequestsThe number of requests sent exceeds the API server's rate limit (number of calls per minute).
500Internal Server Error Something went wrong on Sovos' end.
501Not ImplementedThe requested functionality has not yet been implemented.
503Service UnavailableThe server is currently overloaded with requests, out of resources, or is currently under maintenance.
504Gateway TimeoutThe request was timed out.

Handle HTTP errors

Because all error codes in the 400 range represent client errors, you must fix them before making another API request. The only exceptions are error codes 408 and 429, where a wait time of at least one minute is recommended before retrying.

For an error code within the 500 range, which represents server errors, you must wait one minute after the initial error before sending the request again. If the issue persists, continue to retry the request every five minutes for up to an hour. If the error remains unresolved, reach out to Sovos' Support team for assistance. The only exception is error code 501. In this case, there's no need to retry, because the error indicates that the functionality has not been implemented yet.

Error responses

If there's an error, the JSON response always contains the same elements. You can use the status and subCode elements to create an automated error-handling process. You can also use the message element to get a human-readable description of the error.

The following information is included in the response schema:

Response schemaType#Description
timestampnumber1..1Unix timestamp from when the request was executed.
statusnumber1..1The HTTP status code.
successBoolean1..1Shows if the request was successful. In case of errors, it will always be "false".
messagestring1..1A human-readable message describing the error.
errorsmessagestring1..1Properties related to error data.
subCodestring1..1The error's subcode.

Available subcodes

These are the possible HTTP status codes and the corresponding subCode that the Indirect Tax API can return:

HTTP Status CodesubCode
300document.signature.valid
301document.signature.invalid
302document.signature.signerInvalid
400invalidParameter
400missingParameter
400parseError
400operationNotImplemented
400countryNotSupported
400document.error
400document.invalidParameter
400document.malformed
400document.documentDataInvalid
400document.invalidBusinessProcess
400document.auditDetailsNotSupported
400document.noApplicableKeyReference
400document.secondFactorNeeded
400document.auxiliaryFunctionClientFailure
400document.unsupportedAuxiliaryFunction
400document.asyncBehaviorRequired
400document.noApplicableIndividualKey
401authorization.invalidCredentials
403notSupported
403config.companyNotRegistered
403config.companyAlreadyRegistered
403config.companyNotEnabled
403config.companyAlreadyEnabled
403config.companyClosed
403config.companyLocked
403config.companyNotLocked
403config.branchNotRegistered
403config.branchAlreadyRegistered
403config.branchNotSpecified
403config.countryNotEnabled
403config.countryOfEstablishmentAlreadySet
403config.certificateAndKeyMismatch
403config.certificateAlreadyExists
403config.certificateNotTimeValid
403config.invalidPassword
403config.ReferentialIntegrityFailure
403document.branchNotRegistered
403document.branchNotSpecified
403document.countryNotEnabled
403document.storageLimitExceeded
403document.invoiceExpired
403document.counterpartyFailure
403document.blocked
403document.unusableIndividualKey
403document.noPin
403document.wrongPin
403document.certificateNotTimeValid
403document.invalidPassword
403document.workflowNotSupported
404notFound
404config.companyNotFound
404config.IdentityProviderNotFound
404config.notFound
404document.notFound
405httpMethodNotAllowed
409duplicated
409idempotency.inProgress
409idempotency.doesNotMatch
409document.operationUniquenessViolation
500system.error
501proxyNotImplemented
503serviceUnavailable
504timeout

Response fields

Fields that can be part of the responses and sometimes part of the request parameters:

productId
This is the ID of a product within the Sovos system. Sovos defines different products for each country and, if necessary, different products within the same country. A company must have at least one product, but can have multiple products.
appPrefix
This is the application prefix, which is for internal Sovos use only. This field can be ignored.

Samples

{
    "timestamp": 1634217741305,
    "status": 202,
    "success": true,
    "message": "Document Received",
    "data": {
        "documentId": "a21b76210c0b6044690bb450d3f3bea354d1"
    }
}
{
    "timestamp": 1639056915485,
    "status": 200,
    "success": true,
    "message": "Notifications Listed",
    "data": {
        "pageState": {
            "page": 1,
            "perPage": 100,
            "totalPages": 1,
            "totalEntries": 2
        },
        "notifications": [
            {
                "createdDate": "1638473970231",
                "metadata": {
                    "productId": "NFe",
                    "documentId": "LXNvdm9zfDk5OTl8NTV8MTMxNXwxMTQ0MDM0MQ==",
                    "erpDocumentId": "11111",
                    "erpSystemId": "UAT800",
                    "processType": "0",
                    "taxId": "06158643000144",
                    "sciCloudStatusCode": "200",
                    "sciResponseCode": "AP",
                    "sciStatusAction": "NOA"
                },
                "appPrefix": "Smart DF-e",
                "notificationId": 13248873,
                "content": "PEF...c2U+"
            },
            {
                "createdDate": "1638475005999",
                "metadata": {
                    "productId": "NFe",
                    "documentId": "LXNvdm9zfDk5OTl8NTV8MTMxNnwxMTg2OTgyOQ==",
                    "erpDocumentId": "00001",
                    "erpSystemId": "UAT800",
                    "processType": "0",
                    "taxId": "06158643000144",
                    "sciCloudStatusCode": "200",
                    "sciResponseCode": "AP",
                    "sciStatusAction": "NOA"
                },
                "appPrefix": "Smart DF-e",
                "notificationId": 13250178,
                "content": "PEF...c2U+"
            }
        ]
    }
}
{
    "timestamp": 1634217579717,
    "status": 401,
    "success": false,
    "message": "Unauthorized",
    "errors": [
        {
            "message": "The request requires user authentication.",
            "subCode": "authorization.invalidCredentials"
        }
    ]
}