Filing

How the External Partner API works

The External Partner API follows a fixed sequence of steps to authenticate, import, and process your VAT transaction data.

The External Partner API connects to Sovos through an Apigee API gateway (the API management layer). The gateway authenticates every request and routes it to the External Partner API service. Each step depends on the previous one completing successfully:

  1. Get the filing period for your company and country using specific identifiers.

  2. Register a transaction import for that filing period. The API returns a time-limited upload URL and an import ID.

  3. Upload your JSON transaction file to the upload URL using an HTTP PUT request.

  4. Poll the import status using the import ID until it reaches COMPLETED or FAILED status.

  5. Download result files for the filing or import after the processing finishes.

User onboarding journey

After setting up your account, you must follow a series of steps to start using the External Partner API to submit your VAT filing data and retrieve your results. Some of these steps happen through the External Partner API. Others happen in VAT Filing.

Onboarding steps overview

Set up your account
Before you can use VAT Filing, Sovos creates your client account using your workspace credentials, a key and a secret. This account gets product IDs and an admin email. Sovos does this step through the API.
Create your company profile

After Sovos sets up your account, you must create a company under that account, specifying these information about the company:

  • Country

  • Tax registration number

  • Other company details

You complete this step through the API.

Get an access token
You must use your account's API key and secret to generate an access token. You need this token to authenticate every API call that follows.
Listing available filings
You must call the External Partner API to list the filings available for your company. In a non-production environment, this call might return sample data. In production, the response reflects your company's real filings based on its country and configuration.
Upload your transaction files

For a specific filing, you must request a time-limited link. After you upload your transaction file in JSON format to that link, Sovos processes it. If the file has problems, Sovos returns errors so you can fix and re-upload it. If the file is valid, Sovos marks it as complete.

Get your result files

After Sovos processes your file, you can retrieve result files through the API, such as error reports, draft PDFs, and XML files. Each new upload replaces the previous result files for that filing, so only the latest version is available.

Make manual adjustments and finish the filing

If you need to adjust the filing by hand, open the VAT Filing web application using Single Sign On (SSO) through Security Assertion Markup Language (SAML) and the filing ID. There, you can make adjustments, generate draft or final PDFs, and finalize the report. The API always reflects the latest status and files, even after changes made in the web application.

When you trigger a SAML Login, add a state parameter to the request. Apply Base64 encoding to its value before you send it. The decoded value is a JSON object with two fields, page and id, that tell the VAT Filing application which page to open and which filing to load.

For example, { page: 'filing', id: '911' } encodes to eyJwYWdlIjogImZpbGluZyIsICJpZCI6ICI5MTEifQ==.

Filter your results

You can filter filings and companies by country, date, and report type using query parameters in the API.

Check status updates

You can check status updates, such as file processing or report completion, by polling the API.

Integration flow

Connect your backend to the Sovos VAT Filing service.

The integration runs in two phases. First, your backend authenticates each API request with a bearer token and imports transaction data through the External Partner API. Then you review, adjust, and finalize the return in VAT Filing. When the filing is complete, your backend gets the result files.

Flow steps overview

Prerequisites
Set up accounts and companies, so that requests scope to organization, account, and company.
List filings
Send a GET request for available filing periods for account and company. The response includes the filing ID, start and end dates, and related metadata.
Import data
Send a POST request to get an upload link for the JSON file (filing ID and account or company context). Then send a PUT request with the file and a GET request to poll until the import reaches a terminal state.
Import failure
Sovos stores error files and logs. Use a GET request to import result files to get per-file download links (accessUrl), names, and expirations for each file.
Import success
The filing moves to In Progress and redirects to VAT Filing.
In VAT Filing
You run the report (initial values, selected period, and so on). Each manual adjustment can produce new files with updates.
Final report
Final values and detail reports (JSON or CSV) are available, and the filing reaches Complete.
Results
Send a GET request for filing result files to get per-file download links (accessUrl), names, and expirations. Download each filing result files before its link expires.
Note:

For asynchronous notifications and redirect parameters after import, see VAT Filing return flow.

External Partner API HTTP errors

These are the typical status codes.

401
Not authenticated. The bearer token is missing, invalid, or expired.
403
Authenticated but not authorized for the company, filing, import, or operation.
404
The operation declares a missing resource or empty list.
400
After a POST request import, it means the body fails validation.
500
Unexpected upstream or gateway failures. Retry with backoff. Then you have to include the response uuid when you contact Sovos support.
Note:

See the API reference.

Integration flow diagram

This flowchart shows the end-to-end partner integration from prerequisites through result download.

External Partner API and VAT Filing end-to-end partner integration.

Sequence diagram

The sequence diagram shows the message exchange between the partner's backend, the External Partner API, you, and VAT Filing.External Partner API and VAT Filing message exchange flow diagram.

External Partner API responses

Understand response fields, HTTP status codes, and subcodes to handle API responses in your code.

Every API response uses the same StandardEnvelope structure, whether the call succeeds or fails. Each response includes these fields.

Response element Type Description
success boolean A flag indicating whether the call succeeded. Always false for error responses.
status integer The HTTP status code. Always equal to the HTTP status code of the response.
message string A short description of the outcome.
timestamp integer The time of the response (Unix epoch ms).
uuid string (UUID) A correlation ID for this response for support tracing.
data object The response payload.
errors array

An array of error details (ErrorItem object). Each item in the errors array has two properties message (string, required) and subCode (string, optional).

Always null for error responses.

Successful response example:

JSON
{
  "success": true,
  "status": 200,
  "message": "OK",
  "timestamp": 1776333600000,
  "uuid": "7c9e2f1a-4b3d-5e6f-7890-abcdef123456",
  "data": { ... },
  "errors": []
}

You can write one response handler for the entire API. Use the uuid field when you contact Sovos support to trace any call.

Note:

See API concepts for more on the standard envelope.

Date and timestamps

The External Partner API uses ISO 8601 and Unix epoch milliseconds format to manage the different date field types and timestamps.

ISO 8601 dates

The External Partner API uses ISO 8601 dates for the envelope IsoDate to note filing period date boundaries and date filters. startDate,endDate, dueDate, and their query parameter equivalents use this format.

  • Format: YYYY-MM-DD (UTC, no time component)

  • Example: 2019-03-12

startDate and endDate
Time boundary of the filing's reporting period.
dueDate
Deadline for submitting the filing to the tax authority.
expirationDate
Date when a presigned upload or download URL expires.

Timestamps

The API uses timestamps for the envelope timestamp (Unix epoch milliseconds, UTC) field and presigned URL expirationDate fields. expirationDate also appears as a query parameter on GET /filings, where it filters results by expiration timestamp rather than marking a URL's expiry.

  • Type: 64-bit integer (int64)

  • Example: 1776333600000

Important:

Using the wrong date format causes silent filtering errors or upload failures.

Pagination

Use pagination parameters to control how many results list endpoints return.

Use the page and pageSize query parameters to control which results you get.

Parameter Description Type Default Max
page The page number to return. Starts at 1. integer 1 -
pageSize The number of items per page. integer 50 500

Pagination response

Every paginated response includes a pageState object with these fields:

page
Current page number.
perPage
Items returned on this page.
totalPages
Total number of pages.
totalEntries
Total number of records across all pages.

Example of a paginated response:

JSON
"pageState": {
  "page": 1,
  "perPage": 50,
  "totalPages": 3,
  "totalEntries": 120
}

To get all records, iterate requests until page equals totalPages.

Filtering

Two endpoints support filtering: List VAT filings and List transaction imports. Add one or more filter parameters to your request to narrow the results. All filter parameters are optional.

Note:

Both endpoints also support pagination, which lets you control how many results a request returns. For more details, see pagination

Filing filters

All filing filters are optional. Use these parameters on the List VAT filings endpoint.

Parameter Type Description Example
companyId UUID Returns filings for this company only. Include it in most requests. 078be7d7-a1c0-44f8-a2ca-5b23b370d242
country string Returns filings for this country name. Hungary
countryCode string Returns filings for this ISO 3166-1 alpha-2 country code (two characters). HU
returnType string Returns filings for this return or report type. VAT
startDate date Returns filings with a period start date on or after this date. 2019-01-01
endDate date Returns filings with a period end date on or before this date. 2019-03-31
dueDate date Returns filings with this due date. 2019-03-12
page integer Returns the specified number of pages. Minimum number of pages: one. 10
pageSize integer Returns specified number of items per page. Range: 1-500. 15
expirationDate integer Returns filings with the specified expiration timestamp in Unix epoch milliseconds (int64). 1776333600000
Note:

For more details about the date and timestamp formats these parameters use, see Date and timestamps.

Transaction import filters

Use these parameters on List transaction imports.

Parameter Description Example
companyId Returns imports for this company only. 078be7d7-a1c0-44f8-a2ca-5b23b370d242
importId Returns only the import that matches this ID, if it's visible to your token. a1b2c3d4-e5f6-7890-abcd-ef1234567890
status

Returns imports with one of these statuses:

  • PENDING

  • PROCESSING

  • COMPLETED

  • FAILED

COMPLETED