Get one offer
curl --request GET \
--url https://api.aggrefine.com/v1/channels/{channelId}/offers/{offerId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aggrefine.com/v1/channels/{channelId}/offers/{offerId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aggrefine.com/v1/channels/{channelId}/offers/{offerId}', 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.aggrefine.com/v1/channels/{channelId}/offers/{offerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aggrefine.com/v1/channels/{channelId}/offers/{offerId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aggrefine.com/v1/channels/{channelId}/offers/{offerId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aggrefine.com/v1/channels/{channelId}/offers/{offerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"network": "awin",
"merchant": {
"id": "10240",
"name": "Example Shop",
"market": "SE",
"domain": "zooplus.se"
},
"feed": {
"id": "12345",
"name": "Example Shop SE"
},
"sku": "SKU-1",
"mpn": "RC-2551",
"gtin": {
"as_sent": "<string>",
"gtin14": "07310865004703"
},
"title": "Dry dog food 8 kg",
"description": {
"text": "<string>",
"has_html": true
},
"short_description": "<string>",
"brand": "Northpaw",
"category": {
"as_sent": "Hund > Torrfoder",
"path": [
"Hund",
"Torrfoder"
],
"google_id": 3530
},
"price": {
"amount": "499.00",
"as_sent": "<string>"
},
"old_price": {
"amount": "499.00",
"as_sent": "<string>"
},
"currency": "SEK",
"availability": {
"value": "in_stock",
"as_sent": "<string>"
},
"shipping": {
"cost": "49.00",
"delivery_time": "1-3 dagar",
"source": "feed"
},
"color": "<string>",
"size": "8 kg",
"pack_quantity": "<string>",
"item_group_id": "<string>",
"images": [
"<string>"
],
"product_url": "<string>",
"link": "<string>",
"sub_id_template": "https://track.adtraction.com/t/t?epi={sub_id}&a=1&as=2&t=2&tk=1",
"attributes": {
"stock_quantity": "12"
},
"source_updated_at": "2023-11-07T05:31:56Z",
"first_seen_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Offers
Get one offer
GET
/
v1
/
channels
/
{channelId}
/
offers
/
{offerId}
Get one offer
curl --request GET \
--url https://api.aggrefine.com/v1/channels/{channelId}/offers/{offerId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aggrefine.com/v1/channels/{channelId}/offers/{offerId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aggrefine.com/v1/channels/{channelId}/offers/{offerId}', 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.aggrefine.com/v1/channels/{channelId}/offers/{offerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aggrefine.com/v1/channels/{channelId}/offers/{offerId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aggrefine.com/v1/channels/{channelId}/offers/{offerId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aggrefine.com/v1/channels/{channelId}/offers/{offerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"network": "awin",
"merchant": {
"id": "10240",
"name": "Example Shop",
"market": "SE",
"domain": "zooplus.se"
},
"feed": {
"id": "12345",
"name": "Example Shop SE"
},
"sku": "SKU-1",
"mpn": "RC-2551",
"gtin": {
"as_sent": "<string>",
"gtin14": "07310865004703"
},
"title": "Dry dog food 8 kg",
"description": {
"text": "<string>",
"has_html": true
},
"short_description": "<string>",
"brand": "Northpaw",
"category": {
"as_sent": "Hund > Torrfoder",
"path": [
"Hund",
"Torrfoder"
],
"google_id": 3530
},
"price": {
"amount": "499.00",
"as_sent": "<string>"
},
"old_price": {
"amount": "499.00",
"as_sent": "<string>"
},
"currency": "SEK",
"availability": {
"value": "in_stock",
"as_sent": "<string>"
},
"shipping": {
"cost": "49.00",
"delivery_time": "1-3 dagar",
"source": "feed"
},
"color": "<string>",
"size": "8 kg",
"pack_quantity": "<string>",
"item_group_id": "<string>",
"images": [
"<string>"
],
"product_url": "<string>",
"link": "<string>",
"sub_id_template": "https://track.adtraction.com/t/t?epi={sub_id}&a=1&as=2&t=2&tk=1",
"attributes": {
"stock_quantity": "12"
},
"source_updated_at": "2023-11-07T05:31:56Z",
"first_seen_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Path Parameters
Response
The offer
One product in one merchant feed, with your channel's tracking link: the same shape for every network. Every field is always there; only id, network, merchant and feed are always set, any other may be null.
link with a place for your own sub-id (click reference), to tell your clicks and sales apart in the network's reports: replace {sub_id} with your value, URL-encoded. It goes in the parameter the network documents for it: epi on Adtraction, clickref on Awin, subId1 on impact.com. Null when link is null, or on a network that documents no such parameter (Addrevenue).
Example:
"https://track.adtraction.com/t/t?epi={sub_id}&a=1&as=2&t=2&tk=1"