How can we help?

Error handling

Use HTTP status codes and error details to understand why a request failed and what to do next.

The External Partner API uses a two-step approach to diagnose errors:

  1. Checks status to identify problem category.

  2. Checks subCode in the errors array to identify the specific cause and decide how to handle it in your code.

Note:

See API concepts for key terms used on this page.

Error objects

Each item in the errors array is an ErrorItem object with two fields.

FieldTypeDescription
messagestringHuman-readable explanation of the problem.
subCodestringMachine-readable code for branching logic and support.

Use subCode in your error-handling code. It's stable across API versions. Use message for logging and debugging.

Note:

401 and 403 responses don't use the data field from the standard success and 400/404/500 shape.use a slightly different envelope.

How to read an error response

Step 1 - First check
Check success first before reading the rest of the response. If it's false, skip data and go straight to errors.
Step 2 - Branch your error-handling logic
Use status to decide how your code responds. For example: retry on 500, refresh your token on 401.
Step 3 - Read the errors array
Iterate the errors array. Use subCode for branching logic and message for logging. Ignore data on error.
Step 4 - Support call tracing
Include timestamp, uuid, and message in your support requests to help Sovos trace the call.
Note:

See API Responses.

HTTP status codes

CodeMeaningWhat to do
200SuccessProcess the response.
400Bad request

Your request failed validation. Check the errors array for details.

A common cause is trying to import data for a filing that's already in Complete status.

401Unauthorized

Your token is missing, invalid, or expired. Refresh your token and retry.

The response has no data field.

403Forbidden

Your token is valid, but you don't have permission for the resource or operation. Check errors[].subCode to identify the specific problem.

Don't retry without changing your token or request. The response has no data field.

404Not foundThe resource doesn't exist, has no data, or isn't visible to your token. data is null.
500Server error

An unexpected error occurred on the server. data is null, errors has at least one item. Retry using exponential backoff.

If the problem persists, contact Sovos support and include the uuid from the response.

400 Bad request

Your request failed validation. A common cause is trying to import transactions for a filing that's already in Complete status.

{
        "success": false,
        "status": 400,
        "message": "Bad request",
        "timestamp": 1776333600000,
        "uuid": "a1b2c3d4-e5f6-7890-ab12-cdef34567890",
        "data": null,
        "errors": [
            {
            "message": "The filing is already complete. Transaction imports are not allowed.",
            "subCode": "IMPORT-400-FILING_COMPLETE"
            }
        ]
        }
401 and 403 authentication errors

A 401 means your token is missing, invalid, or expired. A 403 means your token is valid but you don't have permission for the resource or operation. Check your token and try again.

404 Not found

The resource doesn't exist or isn't visible to your token. Check that the ID in your request is correct.

{
        "success": false,
        "status": 404,
        "message": "Filing not found",
        "timestamp": 1776333600000,
        "uuid": "e5f6a7b8-c9d0-1234-ef01-567890123456",
        "data": null,
        "errors": [
            {
            "message": "No filing exists for the given company and filing id",
            "subCode": "FILING-404"
            }
        ]
        }
Handling 500 errors
Any endpoint can return 500. Retry your request using exponential backoff. If the problem persists, contact Sovos support and include the uuid from the response to help trace the call.
Reading error details
Every error response uses the same envelope structure. Check the errors array for details. Each item includes a message and a subCode to help you identify the specific cause.

Known subcodes

subCodeStatusCause
authorization.invalidCredentials401Missing, invalid, or expired token.
authorization.forbidden403Authenticated but not authorized.
FILING-404404Filing not found, no filings match the filters, or no result files available.
IMPORT-404404Import not found, no imports exist for the company, or no result files available.
IMPORT-400-FILING_COMPLETE400The filing is already COMPLETE. You can't import transactions for a closed period.
VAL-400-12400metadata.fileSize must be greater than zero.
VAL-400-03400metadata.importProfileId must be a valid UUID.
SRVR-500500Unexpected server error.
Filing.CompanyNotFound400The company.id in the request body doesn't match the company context in your Bearer token.

Errors returned to the client

Error codeDescriptionError returned to the client
Import.ProfileNotFoundNo import profile could be resolved for the account.An error occurred while importing the file. Import Profile not found.
Import.AccountInactiveOrMissingAccount missing or inactive.Authenticated Account is not active or not found.
Import.FileImportProcessFailedException during processing in dashboard JSON FileImport.An error occurred while importing the file. Verify it is in the correct format.
Import.DuplicateAdministrationCompanyDuplicate administration + company in the payload after mapping.

Can't import file. The uploaded file contains duplicate administrations with (administration code and company code).

Edit the uploaded file and remove or change the duplicate administrations.

Import.ColumnMappingMissinMapped profile column missing from the JSON-derived row.

Row n: Field field has no mapping.

Make sure the import profile column is present in the imported file or select "Import no columns" as null.

Import.RequiredColumnMissingAfterMappingRequired column missing after JSON→table mapping.

Row n: Column field: The uploaded file is missing the specified column and could not be mapped.

Edit the file and add the missing column or select "Import no columns" as null.

Import.RequiredFieldEmptyRequired field empty for that row.

Row n: The uploaded file is missing the required data for column field.

Edit the file and add the missing data.

Import.InvalidCurrencyFormatCurrency format invalid for that field.

Row n: Invalid format value in column column.

Format currency with a comma as the thousand separator, and a decimal point before the cents (for example 400,755.52).

Import.InvalidDateFormatDate/datetime format invalid.

Row n: Invalid format value in column column.

Check the allowed date formats specified in the import profile used, for example: dd/mm/yyyy.

Import.InvalidNumericFormatNumeric format invalid.Row n: Invalid format value in column column. Only numeric data is allowed.
Import.FieldTypeConversionFailedValue can't be converted to the target type.Row n: Error converting document column column to field field, field value value can't be converted into datatype type.
Import.MetadataInvalidCurrencyFormatMetadata currency format invalid.

Invalid format for value in metadata field field.

Check the allowed currency format on the import profile used, for example: 400,755.52.

Import.MetadataInvalidDateFormatMetadata date format invalid.

Invalid format value in metadata field field.

Check the allowed date formats specified in the import profile used, for example: dd/mm/yyyy.

Import.MetadataInvalidNumericFormatMetadata numeric format invalid.Invalid format value in metadata field field. Only numeric data is allowed.
Import.MetadataTypeConversionFailedMetadata conversion failed.Error converting metadata field field, field value value can't be converted into datatype type.
Import.TranslationNotFoundTranslation lookup returned no row.

Row n: The value value in field field isn't found in the translation table, which is used to transform information in this field from one value into another.

Edit the uploaded file to match a value in the table, or update the translation table.

Import.TranslationAmbiguousTranslation lookup returned multiple rows.

Row n: The value value in field field matches multiple rows in translation table, which is used to transform information in this field from one value into another.

Edit the imported file or translation table to remove the duplication.

Import.InvalidRowDataGeneric invalid-data path after mapping.Row n: Invalid data. This data can't be processed. Edit the uploaded file and correct the data.
Import.AdministrationUnresolvedAdministration can't be resolved from the mapped data.

Row n: Can't attach to Administration value because it is either missing an administration code or it isn't attached to the VAT Code or the Company Code.

Verify that you have all codes in your uploaded file.

Import.DataAccuracyRuleFailedData accuracy rule failed.(Full message from rule)
Import.RequiredJsonMappingFieldMissingMissing required field for JSON/import mapping.Row n: (dynamic text)
Import.ImportPolicyViolationBlocked by account policy.Row n: InvoiceNumber: value . This invoice can't be imported due to the restrictions provided by your account administrator.
Import.DateYearBelowMinimumDate year before 1753.Row: n, "value" - Invalid date (min year: 1753). Check and correct all date fields.