curl --request POST \
--url https://www.closient.com/retailers/api/v1/retailers/{retailer_id}/storefronts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"country": "CA",
"currency": "CAD",
"is_active": true,
"name": "Sephora Canada",
"url": "https://www.sephora.ca"
}
'import requests
url = "https://www.closient.com/retailers/api/v1/retailers/{retailer_id}/storefronts"
payload = {
"country": "CA",
"currency": "CAD",
"is_active": True,
"name": "Sephora Canada",
"url": "https://www.sephora.ca"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: 'CA',
currency: 'CAD',
is_active: true,
name: 'Sephora Canada',
url: 'https://www.sephora.ca'
})
};
fetch('https://www.closient.com/retailers/api/v1/retailers/{retailer_id}/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://www.closient.com/retailers/api/v1/retailers/{retailer_id}/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([
'country' => 'CA',
'currency' => 'CAD',
'is_active' => true,
'name' => 'Sephora Canada',
'url' => 'https://www.sephora.ca'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-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://www.closient.com/retailers/api/v1/retailers/{retailer_id}/storefronts"
payload := strings.NewReader("{\n \"country\": \"CA\",\n \"currency\": \"CAD\",\n \"is_active\": true,\n \"name\": \"Sephora Canada\",\n \"url\": \"https://www.sephora.ca\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-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://www.closient.com/retailers/api/v1/retailers/{retailer_id}/storefronts")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"CA\",\n \"currency\": \"CAD\",\n \"is_active\": true,\n \"name\": \"Sephora Canada\",\n \"url\": \"https://www.sephora.ca\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/retailers/api/v1/retailers/{retailer_id}/storefronts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"CA\",\n \"currency\": \"CAD\",\n \"is_active\": true,\n \"name\": \"Sephora Canada\",\n \"url\": \"https://www.sephora.ca\"\n}"
response = http.request(request)
puts response.read_body{
"created": true,
"storefront_id": "c3d4e5f6-7890-1234-abcd-ef3456789012",
"url": "https://www.sephora.ca"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Declare a retailer web property
Create or update one of the retailer’s online storefronts, keyed on its root URL. A retailer has one property per country it sells through online — sephora.com for the US, sephora.ca for Canada — and each carries its own product URLs, which is what lets a hosted page pick the right URL for the visitor’s country.
This endpoint exists because listings deliberately never create a storefront implicitly: at import scale that would fabricate retailer web properties nobody confirmed exist. Declare the property once here, then reference its root URL as store_url on listing rows.
Sending the same url again updates that property rather than adding a second one.
retailer_id is a retailers.Retailer. An organization-private retailer requires OWNER or MANAGER on the organization that owns it; a canonical (Closient-curated) retailer requires a staff account.
curl --request POST \
--url https://www.closient.com/retailers/api/v1/retailers/{retailer_id}/storefronts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"country": "CA",
"currency": "CAD",
"is_active": true,
"name": "Sephora Canada",
"url": "https://www.sephora.ca"
}
'import requests
url = "https://www.closient.com/retailers/api/v1/retailers/{retailer_id}/storefronts"
payload = {
"country": "CA",
"currency": "CAD",
"is_active": True,
"name": "Sephora Canada",
"url": "https://www.sephora.ca"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: 'CA',
currency: 'CAD',
is_active: true,
name: 'Sephora Canada',
url: 'https://www.sephora.ca'
})
};
fetch('https://www.closient.com/retailers/api/v1/retailers/{retailer_id}/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://www.closient.com/retailers/api/v1/retailers/{retailer_id}/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([
'country' => 'CA',
'currency' => 'CAD',
'is_active' => true,
'name' => 'Sephora Canada',
'url' => 'https://www.sephora.ca'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-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://www.closient.com/retailers/api/v1/retailers/{retailer_id}/storefronts"
payload := strings.NewReader("{\n \"country\": \"CA\",\n \"currency\": \"CAD\",\n \"is_active\": true,\n \"name\": \"Sephora Canada\",\n \"url\": \"https://www.sephora.ca\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-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://www.closient.com/retailers/api/v1/retailers/{retailer_id}/storefronts")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"CA\",\n \"currency\": \"CAD\",\n \"is_active\": true,\n \"name\": \"Sephora Canada\",\n \"url\": \"https://www.sephora.ca\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/retailers/api/v1/retailers/{retailer_id}/storefronts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"CA\",\n \"currency\": \"CAD\",\n \"is_active\": true,\n \"name\": \"Sephora Canada\",\n \"url\": \"https://www.sephora.ca\"\n}"
response = http.request(request)
puts response.read_body{
"created": true,
"storefront_id": "c3d4e5f6-7890-1234-abcd-ef3456789012",
"url": "https://www.sephora.ca"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Authorizations
Path Parameters
Unique identifier of the retailer this property belongs to.
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$Body
One of a retailer's web properties.
Root URL of the storefront — its identity, and the value a listing's urls[].store_url must match. Unique per retailer, so sending the same URL again updates the property rather than adding a second one.
Must be an absolute http(s) URL. The constraint is published rather than merely enforced, because this value is matched verbatim against a listing's store_url: a storefront stored with a malformed URL is one no listing can ever reference, and nothing downstream would report that.
500^https?://[^\s/?#]+[^\s]*$Display name. Defaults to ' Online' when blank.
255ISO 4217 code this storefront transacts in — three uppercase letters. Offers attached here use it for their prices.
A pattern rather than an enum of codes: OnlineStore.currency carries no choices, so an enum here would publish a constraint the model does not enforce and would drift from it silently.
^[A-Z]{3}$ISO 3166-1 alpha-2 country code (US, CA, GB). Case-insensitive on input and normalized to upper case; unassigned codes are rejected with a 422.
2^[A-Za-z]{2}$Disable without deleting when a property goes dark. Only active storefronts can be referenced by a listing URL.