curl --request POST \
--url https://www.closient.com/account/api/v1/organizations/{organization_id}/retailer-clients \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"backfill_lookback_days": 90,
"name": "Loyalty backend (production)",
"retailer_id": "a1b2c3d4-5678-9012-abcd-ef1234567890",
"scope": "write",
"sector_identifier": "shop.example-retailer.com",
"submission_cadence_hours": 24
}
'import requests
url = "https://www.closient.com/account/api/v1/organizations/{organization_id}/retailer-clients"
payload = {
"backfill_lookback_days": 90,
"name": "Loyalty backend (production)",
"retailer_id": "a1b2c3d4-5678-9012-abcd-ef1234567890",
"scope": "write",
"sector_identifier": "shop.example-retailer.com",
"submission_cadence_hours": 24
}
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({
backfill_lookback_days: 90,
name: 'Loyalty backend (production)',
retailer_id: 'a1b2c3d4-5678-9012-abcd-ef1234567890',
scope: 'write',
sector_identifier: 'shop.example-retailer.com',
submission_cadence_hours: 24
})
};
fetch('https://www.closient.com/account/api/v1/organizations/{organization_id}/retailer-clients', 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/account/api/v1/organizations/{organization_id}/retailer-clients",
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([
'backfill_lookback_days' => 90,
'name' => 'Loyalty backend (production)',
'retailer_id' => 'a1b2c3d4-5678-9012-abcd-ef1234567890',
'scope' => 'write',
'sector_identifier' => 'shop.example-retailer.com',
'submission_cadence_hours' => 24
]),
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/account/api/v1/organizations/{organization_id}/retailer-clients"
payload := strings.NewReader("{\n \"backfill_lookback_days\": 90,\n \"name\": \"Loyalty backend (production)\",\n \"retailer_id\": \"a1b2c3d4-5678-9012-abcd-ef1234567890\",\n \"scope\": \"write\",\n \"sector_identifier\": \"shop.example-retailer.com\",\n \"submission_cadence_hours\": 24\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/account/api/v1/organizations/{organization_id}/retailer-clients")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"backfill_lookback_days\": 90,\n \"name\": \"Loyalty backend (production)\",\n \"retailer_id\": \"a1b2c3d4-5678-9012-abcd-ef1234567890\",\n \"scope\": \"write\",\n \"sector_identifier\": \"shop.example-retailer.com\",\n \"submission_cadence_hours\": 24\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/account/api/v1/organizations/{organization_id}/retailer-clients")
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 \"backfill_lookback_days\": 90,\n \"name\": \"Loyalty backend (production)\",\n \"retailer_id\": \"a1b2c3d4-5678-9012-abcd-ef1234567890\",\n \"scope\": \"write\",\n \"sector_identifier\": \"shop.example-retailer.com\",\n \"submission_cadence_hours\": 24\n}"
response = http.request(request)
puts response.read_body{
"backfill_lookback_days": 90,
"client_id": "rc_documentationExampleClientIdNotReal",
"client_secret": "rcs_documentationExampleClientSecretNotReal",
"created": "2026-09-07T21:00:00Z",
"id": "d5e6f7a8-9012-3456-abcd-ef7890123456",
"is_enabled": true,
"name": "Loyalty backend (production)",
"retailer_id": "a1b2c3d4-5678-9012-abcd-ef1234567890",
"scope": "write",
"secret_prefix": "rcs_Ab3",
"sector_identifier": "shop.example-retailer.com",
"submission_cadence_hours": 24
}{
"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"
}{
"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"
}Register retailer client
Register a retailer client and issue its first secret. The secret is returned in this response only. Requires MANAGE_RETAILER_CLIENTS permission.
curl --request POST \
--url https://www.closient.com/account/api/v1/organizations/{organization_id}/retailer-clients \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"backfill_lookback_days": 90,
"name": "Loyalty backend (production)",
"retailer_id": "a1b2c3d4-5678-9012-abcd-ef1234567890",
"scope": "write",
"sector_identifier": "shop.example-retailer.com",
"submission_cadence_hours": 24
}
'import requests
url = "https://www.closient.com/account/api/v1/organizations/{organization_id}/retailer-clients"
payload = {
"backfill_lookback_days": 90,
"name": "Loyalty backend (production)",
"retailer_id": "a1b2c3d4-5678-9012-abcd-ef1234567890",
"scope": "write",
"sector_identifier": "shop.example-retailer.com",
"submission_cadence_hours": 24
}
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({
backfill_lookback_days: 90,
name: 'Loyalty backend (production)',
retailer_id: 'a1b2c3d4-5678-9012-abcd-ef1234567890',
scope: 'write',
sector_identifier: 'shop.example-retailer.com',
submission_cadence_hours: 24
})
};
fetch('https://www.closient.com/account/api/v1/organizations/{organization_id}/retailer-clients', 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/account/api/v1/organizations/{organization_id}/retailer-clients",
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([
'backfill_lookback_days' => 90,
'name' => 'Loyalty backend (production)',
'retailer_id' => 'a1b2c3d4-5678-9012-abcd-ef1234567890',
'scope' => 'write',
'sector_identifier' => 'shop.example-retailer.com',
'submission_cadence_hours' => 24
]),
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/account/api/v1/organizations/{organization_id}/retailer-clients"
payload := strings.NewReader("{\n \"backfill_lookback_days\": 90,\n \"name\": \"Loyalty backend (production)\",\n \"retailer_id\": \"a1b2c3d4-5678-9012-abcd-ef1234567890\",\n \"scope\": \"write\",\n \"sector_identifier\": \"shop.example-retailer.com\",\n \"submission_cadence_hours\": 24\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/account/api/v1/organizations/{organization_id}/retailer-clients")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"backfill_lookback_days\": 90,\n \"name\": \"Loyalty backend (production)\",\n \"retailer_id\": \"a1b2c3d4-5678-9012-abcd-ef1234567890\",\n \"scope\": \"write\",\n \"sector_identifier\": \"shop.example-retailer.com\",\n \"submission_cadence_hours\": 24\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/account/api/v1/organizations/{organization_id}/retailer-clients")
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 \"backfill_lookback_days\": 90,\n \"name\": \"Loyalty backend (production)\",\n \"retailer_id\": \"a1b2c3d4-5678-9012-abcd-ef1234567890\",\n \"scope\": \"write\",\n \"sector_identifier\": \"shop.example-retailer.com\",\n \"submission_cadence_hours\": 24\n}"
response = http.request(request)
puts response.read_body{
"backfill_lookback_days": 90,
"client_id": "rc_documentationExampleClientIdNotReal",
"client_secret": "rcs_documentationExampleClientSecretNotReal",
"created": "2026-09-07T21:00:00Z",
"id": "d5e6f7a8-9012-3456-abcd-ef7890123456",
"is_enabled": true,
"name": "Loyalty backend (production)",
"retailer_id": "a1b2c3d4-5678-9012-abcd-ef1234567890",
"scope": "write",
"secret_prefix": "rcs_Ab3",
"sector_identifier": "shop.example-retailer.com",
"submission_cadence_hours": 24
}{
"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"
}{
"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"
}Path Parameters
Body
Request body for registering a retailer client.
URL-safe 22-character shortuuid encoding of the row's UUID primary key. Stable across the row's lifetime; suitable for sharing in URLs, log lines, and external SDK clients. Accepted on input as either the shortuuid form or the canonical UUID form (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$Response
OK
The newly registered client, with its secret. The only place a secret is issued besides rotation.
URL-safe 22-character shortuuid encoding of the row's UUID primary key. Stable across the row's lifetime; suitable for sharing in URLs, log lines, and external SDK clients. Accepted on input as either the shortuuid form or the canonical UUID form (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$URL-safe 22-character shortuuid encoding of the row's UUID primary key. Stable across the row's lifetime; suitable for sharing in URLs, log lines, and external SDK clients. Accepted on input as either the shortuuid form or the canonical UUID form (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$