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",
"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",
"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',
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',
'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 \"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 \"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 \"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",
"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",
"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",
"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',
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',
'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 \"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 \"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 \"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",
"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"
}Authorizations
Path Parameters
Organization ID.
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$Body
Request body for registering a retailer client.
Human-readable label for the credential.
1 - 255Host that scopes the pairwise subject identifiers issued to this client. Canonicalised (lower-cased and trimmed) before storage. Cannot be shared with another organization.
1 - 255How many days back you declare you will backfill purchases when a consumer first links.
x >= 1How often, in hours, you declare you will submit purchases.
x >= 1URL-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}$Human-readable label for this credential.
Public client identifier. Opaque, stable, safe to log.
Canonical (lower-cased) host that scopes the pairwise subject identifiers issued to this client. Belongs to one organization.
How many days back the retailer declares it will backfill purchases on first link.
How often, in hours, the retailer declares it will submit purchases.
False while the client's credentials are rejected.
Leading characters of the current secret, for identification only. Never sufficient to authenticate.
ISO 8601 timestamp the client was registered.
The client secret. Returned only in this response; it cannot be retrieved again, only rotated.
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}$ISO 8601 timestamp the secret was last rotated, or null if the original is still current.
ISO 8601 timestamp of the last successful authentication, or null if never used.