Import Raw Matches
curl --request POST \
--url https://api.example.com/v1/matching/raw-imports \
--header 'Content-Type: multipart/form-data' \
--header 'Idempotency-Key: <idempotency-key>' \
--form file=@example-file \
--form 'country_code=<string>' \
--form 'currency=<string>'import requests
url = "https://api.example.com/v1/matching/raw-imports"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"country_code": "<string>",
"currency": "<string>"
}
headers = {"Idempotency-Key": "<idempotency-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('country_code', '<string>');
form.append('currency', '<string>');
const options = {method: 'POST', headers: {'Idempotency-Key': '<idempotency-key>'}};
options.body = form;
fetch('https://api.example.com/v1/matching/raw-imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/matching/raw-imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"currency\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/matching/raw-imports"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"currency\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/matching/raw-imports")
.header("Idempotency-Key", "<idempotency-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"currency\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/matching/raw-imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"currency\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Matching
Import raw competitor CSVs
Store raw competitor prices, with optional automatic catalog matching.
POST
/
v1
/
matching
/
raw-imports
Import Raw Matches
curl --request POST \
--url https://api.example.com/v1/matching/raw-imports \
--header 'Content-Type: multipart/form-data' \
--header 'Idempotency-Key: <idempotency-key>' \
--form file=@example-file \
--form 'country_code=<string>' \
--form 'currency=<string>'import requests
url = "https://api.example.com/v1/matching/raw-imports"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"country_code": "<string>",
"currency": "<string>"
}
headers = {"Idempotency-Key": "<idempotency-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('country_code', '<string>');
form.append('currency', '<string>');
const options = {method: 'POST', headers: {'Idempotency-Key': '<idempotency-key>'}};
options.body = form;
fetch('https://api.example.com/v1/matching/raw-imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/matching/raw-imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"currency\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/matching/raw-imports"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"currency\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/matching/raw-imports")
.header("Idempotency-Key", "<idempotency-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"currency\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/matching/raw-imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"currency\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Upload one UTF-8 raw CSV with
Country and currency are required two-letter and three-letter codes, normalized to uppercase. The header must fit within 64 KiB and omit
country_code and currency, using your Public API bearer key and a UUID Idempotency-Key.
curl -X POST "$RETAILGRID_API_URL/v1/matching/raw-imports" \
-H "Authorization: Bearer $RETAILGRID_API_KEY" \
-H "Idempotency-Key: $REQUEST_UUID" \
-F "file=@competitors.csv" -F "country_code=ES" -F "currency=EUR"
item_id, external_match_id, match_relation, match_method, and match_confidence. Use the existing raw competitor CSV format. Already matched files belong on matched-snapshots.
The entire multipart request is limited to 25 MiB, including overhead. Coverage/removal fields do not apply to raw imports. A successful request returns 202 and job_id. Poll GET /v1/matching/jobs/{job_id}/progress. By default (match_catalog=true), this synchronizes the catalog and runs automatic matching. To store data for later matching, add -F "match_catalog=false" to the request. Load-only imports do not synchronize or require a catalog and do not launch matching. Every valid raw row remains in Price Radar, even without a catalog match. Results include counts and at most 200 rejection samples.
Existing raw CSV validation still applies: an import with more than 2% invalid rows fails rather than committing a partial dataset.
For load-only imports, result_summary.stored counts stored valid rows, accepted equals stored, rejected counts invalid input rows only, and sent equals stored + rejected. row_errors contains invalid-row diagnostics; unmatched rows are not rejections. With matching enabled, existing accepted/rejected semantics remain unchanged and stored is omitted. Loading raw rows does not create matches or refresh grid prices; match the stored data later to publish those effects.
One organization-wide matching upload runs at a time; a different concurrent upload returns 409. An identical retry returns the same job without another matching run. Reusing a key with different file bytes, market options, or match_catalog returns 409. Receipt bindings are retained indefinitely. Abandoned admissions without a job expire after 24 hours, their files are removed by maintenance, and the same key returns 410; use a new key. Terminal job file cleanup follows the existing worker lifecycle. Authentication failures return 401, oversize requests 413, and invalid headers/market fields 422. Check the job’s terminal status even after 202.
