Public Add Matches
curl --request POST \
--url https://api.example.com/v1/matching/matches:batch-add \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"pairs": [
{
"rg_item_id": "<string>",
"competitor_product_id": "<string>",
"relation": "direct"
}
]
}
'import requests
url = "https://api.example.com/v1/matching/matches:batch-add"
payload = { "pairs": [
{
"rg_item_id": "<string>",
"competitor_product_id": "<string>",
"relation": "direct"
}
] }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pairs: [
{rg_item_id: '<string>', competitor_product_id: '<string>', relation: 'direct'}
]
})
};
fetch('https://api.example.com/v1/matching/matches:batch-add', 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/matches:batch-add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pairs' => [
[
'rg_item_id' => '<string>',
'competitor_product_id' => '<string>',
'relation' => 'direct'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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/matches:batch-add"
payload := strings.NewReader("{\n \"pairs\": [\n {\n \"rg_item_id\": \"<string>\",\n \"competitor_product_id\": \"<string>\",\n \"relation\": \"direct\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Content-Type", "application/json")
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/matches:batch-add")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"pairs\": [\n {\n \"rg_item_id\": \"<string>\",\n \"competitor_product_id\": \"<string>\",\n \"relation\": \"direct\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/matching/matches:batch-add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pairs\": [\n {\n \"rg_item_id\": \"<string>\",\n \"competitor_product_id\": \"<string>\",\n \"relation\": \"direct\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"external_org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_id": "<string>",
"results": [
{
"outcome": "created",
"match": {
"match_id": "<string>",
"version": 123,
"rg_item_id": "<string>",
"competitor_product_id": "<string>",
"competitor": {
"id": "<string>",
"name": "<string>",
"domain": "<string>"
},
"product": {
"name": "<string>",
"url": "<string>",
"sku": "<string>",
"barcode": "<string>",
"brand": "<string>",
"size": "<string>",
"unit": "<string>",
"image_url": "<string>"
},
"match": {
"relation": "direct",
"method": "<string>",
"confidence": 123,
"is_manual": true
},
"offer": {
"price": {
"amount": "<string>",
"currency": "<string>"
},
"regular_price": {
"amount": "<string>",
"currency": "<string>"
},
"promo_price": {
"amount": "<string>",
"currency": "<string>"
},
"availability": "<string>",
"observed_at": "<string>",
"assurance": "<string>"
},
"matched_at": "<string>",
"our_product": "<string>",
"our_details": {
"item_id": "<string>",
"name": "<string>",
"image_url": "<string>",
"price": 123,
"currency": "<string>",
"brand": "<string>",
"barcode": "<string>",
"sku": "<string>",
"size": "<string>",
"unit": "<string>",
"variant_name": "<string>",
"color": "<string>",
"product_url": "<string>",
"stock": 123
}
}
}
],
"counts": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}matching
Public Add Matches
POST
/
v1
/
matching
/
matches:batch-add
Public Add Matches
curl --request POST \
--url https://api.example.com/v1/matching/matches:batch-add \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"pairs": [
{
"rg_item_id": "<string>",
"competitor_product_id": "<string>",
"relation": "direct"
}
]
}
'import requests
url = "https://api.example.com/v1/matching/matches:batch-add"
payload = { "pairs": [
{
"rg_item_id": "<string>",
"competitor_product_id": "<string>",
"relation": "direct"
}
] }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pairs: [
{rg_item_id: '<string>', competitor_product_id: '<string>', relation: 'direct'}
]
})
};
fetch('https://api.example.com/v1/matching/matches:batch-add', 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/matches:batch-add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pairs' => [
[
'rg_item_id' => '<string>',
'competitor_product_id' => '<string>',
'relation' => 'direct'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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/matches:batch-add"
payload := strings.NewReader("{\n \"pairs\": [\n {\n \"rg_item_id\": \"<string>\",\n \"competitor_product_id\": \"<string>\",\n \"relation\": \"direct\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Content-Type", "application/json")
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/matches:batch-add")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"pairs\": [\n {\n \"rg_item_id\": \"<string>\",\n \"competitor_product_id\": \"<string>\",\n \"relation\": \"direct\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/matching/matches:batch-add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pairs\": [\n {\n \"rg_item_id\": \"<string>\",\n \"competitor_product_id\": \"<string>\",\n \"relation\": \"direct\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"external_org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_id": "<string>",
"results": [
{
"outcome": "created",
"match": {
"match_id": "<string>",
"version": 123,
"rg_item_id": "<string>",
"competitor_product_id": "<string>",
"competitor": {
"id": "<string>",
"name": "<string>",
"domain": "<string>"
},
"product": {
"name": "<string>",
"url": "<string>",
"sku": "<string>",
"barcode": "<string>",
"brand": "<string>",
"size": "<string>",
"unit": "<string>",
"image_url": "<string>"
},
"match": {
"relation": "direct",
"method": "<string>",
"confidence": 123,
"is_manual": true
},
"offer": {
"price": {
"amount": "<string>",
"currency": "<string>"
},
"regular_price": {
"amount": "<string>",
"currency": "<string>"
},
"promo_price": {
"amount": "<string>",
"currency": "<string>"
},
"availability": "<string>",
"observed_at": "<string>",
"assurance": "<string>"
},
"matched_at": "<string>",
"our_product": "<string>",
"our_details": {
"item_id": "<string>",
"name": "<string>",
"image_url": "<string>",
"price": 123,
"currency": "<string>",
"brand": "<string>",
"barcode": "<string>",
"sku": "<string>",
"size": "<string>",
"unit": "<string>",
"variant_name": "<string>",
"color": "<string>",
"product_url": "<string>",
"stock": 123
}
}
}
],
"counts": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
application/json

