OMP Report API
Allow Marketplaces generate tax reports for merchants. Use preconfigured reports to inform your sellers about remitted sales tax/ VAT, tax calculated, taxable Jurisdiction and others tax relevant data.
API lets you request various reports that help you manage your Online Marketplace tax obligations. Report types are specified using the Report types enumeration.
Lovat periodically adds new fields and field values to reports.
The report process begins by creating a report request. Next, you obtain a list of report requests which shows the report request identifier and status of each requested report. Finally, you use the report request identifier from this listing to get the actual report. The process steps are as follows:
- Submit a report request using the Report operation. This is a request to Lovat OMP API to generate a specific report.
- Submit a request using the get_report_list operation to get a list that shows the report requests and the status and ID of each report request. Lovat OMP API returns a report_request_id for every report requested. When Lovat sets the status of a report request to DONE, the report is ready to be retrieved.
- If no GeneratedReportId was created, submit a request using the get_report_list operation and include the report_request_id for the report requested. The operation returns a report_id that you can then pass to the Report operation.
- Submit a request using the Report operation to receive a specific report. You include in the request the report_id for the report you want to receive. *Reports are retained for 30 days.
Method
https://omp.vatcompliance.co/api/omp/omp_invoice/{access_token}
Types of reports
Name | Description |
Sales Tax Report
Enumeration value: GET _SALES_TAX_DATA_ |
Tab-delimited flat file for tax-enabled US marketplaces. Content updated daily. |
EU VAT Calculation Report
Enumeration value: _EU_VAT_REPORT_ |
Comma-separated flat file report that provides detailed value-added tax (VAT) calculation information for OMP orders, returns, and refunds. This report is only available for EU sales. Import and export to and from the EU included. |
UK VAT Calculation Report
Enumeration value: _GET_UK_ VAT_Report_ |
Comma-separated flat file report that provides detailed value-added tax (VAT) calculation information for OMP orders, returns, and refunds. This report is only available for the UK sales. Import and export to and from the UK included. |
Merchant Transactions Report
Enumeration value: _GET_MTR_ |
Tab-delimited flat file report that provides detailed information about sales, refunds, and deemed orders by merchant_ID. This report is only available in the UK and the EU. |
JSON Params
Parameter | Type | Description |
report_type | String | A type of requested report, see the table of Report types |
dateTime | dateTime | The earliest date you are looking for, in ISO 8601 date format |
end_date | dateTime | The end of the date range used for selecting the data to report, in ISO 8601 date time format. Example 2022-01-09 |
merchant_id | String |
Requests and Responses
The requests to Lovat API must:
HTTP status: 200 (OK) be sent over HTTPS, use TLS 1.2 or higher, contain authentication parameters,
Request Example
curl -X GET --header 'Content-Type: application/json' --header 'Accept: application/json'
'https://omp.vatcompliance.co/api/omp/report/8bd5963957b4453e9ace41fc4d4aee2f?report_id=00016359'
$url = 'https://omp.vatcompliance.co/api/omp/report/status';
$params = [
'token' => '6cec387781a94425b401206d1710801a',
'report_request_id' => '00012359'
];
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $url . http_build_query($params),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
require 'net/http'
require 'uri'
url = 'https://omp.vatcompliance.co/api/omp/report/status'
params = {
'token' => '6cec387781a94425b401206d1710801a',
'report_request_id' => '00012359'
}
uri = URI("#{url}?#{URI.encode_www_form(params)}")
response = Net::HTTP.get(uri)
puts response
const axios = require('axios');
const url = 'https://omp.vatcompliance.co/api/omp/report/status';
const params = {
token: '6cec387781a94425b401206d1710801a',
report_request_id: '00012359'
};
axios.get(url, { params })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error.message);
})
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string url = "https://omp.vatcompliance.co/api/omp/report/status";
Dictionary<string, string> parameters = new Dictionary<string, string>
{
{ "token", "6cec387781a94425b401206d1710801a" },
{ "report_request_id", "00012359" }
};
HttpClient httpClient = new HttpClient();
// Build the query string with parameters
string queryString = string.Join("&", parameters.Select(p => $"{Uri.EscapeDataString(p.Key)}={Uri.EscapeDataString(p.Value)}"));
string requestUrl = $"{url}?{queryString}";
HttpResponseMessage response = await httpClient.GetAsync(requestUrl);
if (response.IsSuccessStatusCode)
{
string responseContent = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseContent);
}
else
{
Console.WriteLine("Error: " + response.ReasonPhrase);
}
}
}
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
)
func main() {
urlStr := "https://omp.vatcompliance.co/api/omp/report/status"
params := url.Values{
"token": {"6cec387781a94425b401206d1710801a"},
"report_request_id": {"00012359"},
}
// Create the request URL with query parameters
reqURL, err := url.Parse(urlStr)
if err != nil {
fmt.Println("Error parsing URL:", err)
return
}
reqURL.RawQuery = params.Encode()
// Send GET request
resp, err := http.Get(reqURL.String())
if err != nil {
fmt.Println("Error sending GET request:", err)
return
}
defer resp.Body.Close()
// Read and print the response
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response body:", err)
return
}
fmt.Println(string(body))
}
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
public class Main {
public static void main(String[] args) {
String urlStr = "https://omp.vatcompliance.co/api/omp/report/status";
String token = "6cec387781a94425b401206d1710801a";
String reportRequestId = "00012359";
try {
String params = String.format("token=%s&report_request_id=%s",
URLEncoder.encode(token, StandardCharsets.UTF_8),
URLEncoder.encode(reportRequestId, StandardCharsets.UTF_8));
URL url = new URL(urlStr + "?" + params);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
StringBuilder responseBuilder = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
responseBuilder.append(line);
}
reader.close();
System.out.println(responseBuilder.toString());
conn.disconnect();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Method
The request type: GET
https://omp.vatcompliance.co/api/omp/report?token={access_token}&report_id={report_id}
Status of reports
- IN_PROGRESS
- DONE
- DONE_NO_DATA
Params
Parameter | Type | Description | Required |
report_id | String | Maximum 20 characters | Required |
Requests and Responses
The requests to Lovat API must:
HTTP status: 200 (OK) be sent over HTTPS, use TLS 1.2 or higher, contain authentication parameters
Request example
Command Line
curl -X GET --header 'Content-Type: application/json' --header 'Accept: application/json'
'https://omp.vatcompliance.co/api/omp/report?token=6cec387781a94425b401206d1710801a&report_id=00016359'
Response example
Command Line
{
"report_type": "_EU_VAT_REPORT_",
"start_date": "2022-01-09",
"end_date": "2022-30-09",
"report_id": "00016359",
"status"="DONE"
}
]
Errors List
List of supported HTTP errors:
200, 201, 204
No errors
400 Bad Request
This often indicates a required parameter missing. Refer to the response body for details
401 Unauthorized
No valid API key provided
402 Request Failed
Request failed despite valid parameters
403 Forbidden
No permission. Refer to the response body for details
404 Not Found
The requested item doesn’t exist
409, 422
Invalid request parameters
412 Precondition Failed
The project has not been activated yet (used in the Get Token method)
415 Unsupported Media Type
‘Content-Type: application/json’ missing in HTTP header
500, 502, 503, 504 Server Errors
Something went wrong
Date format
Dates are specified as strings according to ISO 8601 (e.g., 2021-01-15).
Date_time are specified as strings according to ISO 8601. You can specify date strings either in UTC (e.g., 2013-01-15T00:00:00Z), or indicating the UTC offset (e.g., 2013-01-15T00:00:00-08:00 for eight hours behind UTC).
In the latter case, make sure to take into account the daylight saving time, if applicable.
Countries
Check out the list of countries supported by Lovat API.
Call limiting
We limit API requests to 1,000 per minute for OMP plans. Our Advanced and Enterprise plans include an increased limit of 5,000 per minute.
You may have more calls than your monthly plan limit. Overage fees are charged separately if you exceed your plan limit during a next month.
Exemption types
For US orders only types of exemption: wholesale, government, marketplace, other, non exempt, or nill.