cURL
curl -X POST https://api.metrifox.com/api/v1/product_catalogues/promotional-entitlements/625f5cee-259b-4994-b7eb-416b9e551f2c/revoke \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"revoke_from": "specific",
"customer_keys": ["cust_001"]
}'import requests
url = "https://{defaultHost}/api/v1/product_catalogues/promotional-entitlements/{id}/revoke"
payload = {
"revoke_from": "specific",
"customer_keys": ["cust_001"]
}
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({revoke_from: 'specific', customer_keys: ['cust_001']})
};
fetch('https://{defaultHost}/api/v1/product_catalogues/promotional-entitlements/{id}/revoke', 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://{defaultHost}/api/v1/product_catalogues/promotional-entitlements/{id}/revoke",
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([
'revoke_from' => 'specific',
'customer_keys' => [
'cust_001'
]
]),
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://{defaultHost}/api/v1/product_catalogues/promotional-entitlements/{id}/revoke"
payload := strings.NewReader("{\n \"revoke_from\": \"specific\",\n \"customer_keys\": [\n \"cust_001\"\n ]\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://{defaultHost}/api/v1/product_catalogues/promotional-entitlements/{id}/revoke")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"revoke_from\": \"specific\",\n \"customer_keys\": [\n \"cust_001\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/api/v1/product_catalogues/promotional-entitlements/{id}/revoke")
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 \"revoke_from\": \"specific\",\n \"customer_keys\": [\n \"cust_001\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Promotional entitlement revoked",
"meta": {},
"data": [
{
"id": "a1b2c3d4-0000-0000-0000-000000000001",
"customer_id": "f4a2f74c-661b-428c-87f8-75cc1aa19c4c",
"customer_key": "cust_001",
"customer_name": "Acme Inc",
"customer_email": "billing@acme.test",
"active": false,
"applied_at": "2026-06-01T10:00:00Z",
"revoked_at": "2026-06-05T12:00:00Z",
"created_at": "2026-06-01T10:00:00Z"
}
],
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"statusCode": 404,
"message": "No active assignments found",
"errors": {}
}Promotional Entitlements
Revoke promotional entitlement
Revoke a promotional entitlement from specific customers or from all customers
POST
/
api
/
v1
/
product_catalogues
/
promotional-entitlements
/
{id}
/
revoke
cURL
curl -X POST https://api.metrifox.com/api/v1/product_catalogues/promotional-entitlements/625f5cee-259b-4994-b7eb-416b9e551f2c/revoke \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"revoke_from": "specific",
"customer_keys": ["cust_001"]
}'import requests
url = "https://{defaultHost}/api/v1/product_catalogues/promotional-entitlements/{id}/revoke"
payload = {
"revoke_from": "specific",
"customer_keys": ["cust_001"]
}
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({revoke_from: 'specific', customer_keys: ['cust_001']})
};
fetch('https://{defaultHost}/api/v1/product_catalogues/promotional-entitlements/{id}/revoke', 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://{defaultHost}/api/v1/product_catalogues/promotional-entitlements/{id}/revoke",
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([
'revoke_from' => 'specific',
'customer_keys' => [
'cust_001'
]
]),
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://{defaultHost}/api/v1/product_catalogues/promotional-entitlements/{id}/revoke"
payload := strings.NewReader("{\n \"revoke_from\": \"specific\",\n \"customer_keys\": [\n \"cust_001\"\n ]\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://{defaultHost}/api/v1/product_catalogues/promotional-entitlements/{id}/revoke")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"revoke_from\": \"specific\",\n \"customer_keys\": [\n \"cust_001\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/api/v1/product_catalogues/promotional-entitlements/{id}/revoke")
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 \"revoke_from\": \"specific\",\n \"customer_keys\": [\n \"cust_001\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Promotional entitlement revoked",
"meta": {},
"data": [
{
"id": "a1b2c3d4-0000-0000-0000-000000000001",
"customer_id": "f4a2f74c-661b-428c-87f8-75cc1aa19c4c",
"customer_key": "cust_001",
"customer_name": "Acme Inc",
"customer_email": "billing@acme.test",
"active": false,
"applied_at": "2026-06-01T10:00:00Z",
"revoked_at": "2026-06-05T12:00:00Z",
"created_at": "2026-06-01T10:00:00Z"
}
],
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"statusCode": 404,
"message": "No active assignments found",
"errors": {}
}Customers are identified by their
customer_key. Use revoke_from: "specific" with a customer_keys array to revoke from a chosen set of customers, or revoke_from: "all" to revoke from every customer that currently holds this promotional entitlement.Only customers with an active assignment for this promotional entitlement are affected. Revoking takes effect immediately.
Authorizations
Path Parameters
The unique identifier of the promotional entitlement to revoke
Body
application/json
specific revokes only from the customers listed in customer_keys.
all revokes from every customer that currently holds this promotional entitlement.
Available options:
specific, all Example:
"specific"
The customer keys to revoke the promotional entitlement from. Required when revoke_from is specific.
Example:
["cust_001"]

