curl --request POST \
--url https://app.levanta.io/api/creator/v1/links/storefronts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "<string>",
"source_sub_id": "<string>",
"source_name": ""
}
'import requests
url = "https://app.levanta.io/api/creator/v1/links/storefronts"
payload = {
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "<string>",
"source_sub_id": "<string>",
"source_name": ""
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
brand_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_id: '<string>',
source_sub_id: '<string>',
source_name: ''
})
};
fetch('https://app.levanta.io/api/creator/v1/links/storefronts', 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://app.levanta.io/api/creator/v1/links/storefronts",
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([
'brand_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source_id' => '<string>',
'source_sub_id' => '<string>',
'source_name' => ''
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.levanta.io/api/creator/v1/links/storefronts"
payload := strings.NewReader("{\n \"brand_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_id\": \"<string>\",\n \"source_sub_id\": \"<string>\",\n \"source_name\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.levanta.io/api/creator/v1/links/storefronts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"brand_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_id\": \"<string>\",\n \"source_sub_id\": \"<string>\",\n \"source_name\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.levanta.io/api/creator/v1/links/storefronts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"brand_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_id\": \"<string>\",\n \"source_sub_id\": \"<string>\",\n \"source_name\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"sourceId": "<string>",
"sourceSubId": "<string>",
"sourceName": "<string>",
"url": "<string>",
"mobileOptimizedUrl": "<string>",
"active": true,
"type": "product",
"marketplace": "amazon.com",
"levantaProductCount": 123
}{
"status": 400,
"message": "You do not have permission to create a default storefront link for this brand"
}{
"status": 401,
"message": "Unauthorized"
}{
"status": 404,
"message": "Default Storefront for Brand or Link Not Found"
}{
"status": 415,
"message": "Invalid Content Type: Must be \"application/json\" for post requests"
}{
"status": 422,
"message": "Input Validation Failed"
}Create Default Storefront Link
Create a link for the default storefront of a brand
curl --request POST \
--url https://app.levanta.io/api/creator/v1/links/storefronts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "<string>",
"source_sub_id": "<string>",
"source_name": ""
}
'import requests
url = "https://app.levanta.io/api/creator/v1/links/storefronts"
payload = {
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "<string>",
"source_sub_id": "<string>",
"source_name": ""
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
brand_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_id: '<string>',
source_sub_id: '<string>',
source_name: ''
})
};
fetch('https://app.levanta.io/api/creator/v1/links/storefronts', 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://app.levanta.io/api/creator/v1/links/storefronts",
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([
'brand_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source_id' => '<string>',
'source_sub_id' => '<string>',
'source_name' => ''
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.levanta.io/api/creator/v1/links/storefronts"
payload := strings.NewReader("{\n \"brand_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_id\": \"<string>\",\n \"source_sub_id\": \"<string>\",\n \"source_name\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.levanta.io/api/creator/v1/links/storefronts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"brand_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_id\": \"<string>\",\n \"source_sub_id\": \"<string>\",\n \"source_name\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.levanta.io/api/creator/v1/links/storefronts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"brand_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_id\": \"<string>\",\n \"source_sub_id\": \"<string>\",\n \"source_name\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"sourceId": "<string>",
"sourceSubId": "<string>",
"sourceName": "<string>",
"url": "<string>",
"mobileOptimizedUrl": "<string>",
"active": true,
"type": "product",
"marketplace": "amazon.com",
"levantaProductCount": 123
}{
"status": 400,
"message": "You do not have permission to create a default storefront link for this brand"
}{
"status": 401,
"message": "Unauthorized"
}{
"status": 404,
"message": "Default Storefront for Brand or Link Not Found"
}{
"status": 415,
"message": "Invalid Content Type: Must be \"application/json\" for post requests"
}{
"status": 422,
"message": "Input Validation Failed"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The storefront link to create
An ID that identifies where the created link will be used. Allowed characters: [a-zA-Z0-9-_@./ ]
1 - 256^[a-zA-Z0-9-_@./ ]*$An ID that identifies where the created link will be used. Allowed characters: [a-zA-Z0-9-_@./ ]
1 - 256^[a-zA-Z0-9-_@./ ]*$Display name for the source within Levanta
250Response
Success
An ID that identifies where the created link will be used. Allowed characters: [a-zA-Z0-9-_@./ ]
An ID to further identify the link underneath the source_id namespace. Allowed characters: [a-zA-Z0-9-_@./ ]
Display name for the source within Levanta
Whether or not the link is active. Inactive links do not earn commissions.
The type of the link. Product links are for amazon asin pages. Storefront links are for amazon storefront pages.
product, storefront The marketplace the link is associated with
amazon.com, amazon.co.uk, amazon.com.mx, amazon.ca, amazon.de, amazon.es, amazon.fr, amazon.it, amazon.nl