curl --request POST \
--url https://sg.sandbox.api.reap.global/policies/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"type": "MERCHANT_RESTRICTION",
"scope": {
"type": "PROJECT"
},
"name": "<string>",
"config": {
"match": {
"dimension": "MCC",
"codes": [
"<string>"
]
}
}
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'MERCHANT_RESTRICTION',
scope: {type: 'PROJECT'},
name: '<string>',
config: {match: {dimension: 'MCC', codes: ['<string>']}}
})
};
fetch('https://sg.sandbox.api.reap.global/policies/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sg.sandbox.api.reap.global/policies/"
payload = {
"type": "MERCHANT_RESTRICTION",
"scope": { "type": "PROJECT" },
"name": "<string>",
"config": { "match": {
"dimension": "MCC",
"codes": ["<string>"]
} }
}
headers = {
"Reap-Version": "<reap-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"scope": {
"type": "PROJECT"
},
"status": "ACTIVE",
"name": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"type": "MERCHANT_RESTRICTION",
"config": {
"match": {
"dimension": "MCC",
"codes": [
"<string>"
]
}
}
}{
"error": {
"code": "POLICY_SCOPE_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}Create policy
Creates a policy. The accepted configuration depends on the policy type.
curl --request POST \
--url https://sg.sandbox.api.reap.global/policies/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"type": "MERCHANT_RESTRICTION",
"scope": {
"type": "PROJECT"
},
"name": "<string>",
"config": {
"match": {
"dimension": "MCC",
"codes": [
"<string>"
]
}
}
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'MERCHANT_RESTRICTION',
scope: {type: 'PROJECT'},
name: '<string>',
config: {match: {dimension: 'MCC', codes: ['<string>']}}
})
};
fetch('https://sg.sandbox.api.reap.global/policies/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sg.sandbox.api.reap.global/policies/"
payload = {
"type": "MERCHANT_RESTRICTION",
"scope": { "type": "PROJECT" },
"name": "<string>",
"config": { "match": {
"dimension": "MCC",
"codes": ["<string>"]
} }
}
headers = {
"Reap-Version": "<reap-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"scope": {
"type": "PROJECT"
},
"status": "ACTIVE",
"name": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"type": "MERCHANT_RESTRICTION",
"config": {
"match": {
"dimension": "MCC",
"codes": [
"<string>"
]
}
}
}{
"error": {
"code": "POLICY_SCOPE_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}Authorizations
API key as Bearer token
Headers
API version (YYYY-MM-DD)
2025-02-14 "2025-02-14"
Unique key for safely retrying this request. Up to 255 characters; we recommend a UUIDv4. The first request executes and its response is cached; subsequent requests with the same key replay the cached response (24h retention).
1 - 255Body
Create a policy.
- MerchantRestriction
- ChannelRestriction
- TransactionAmountLimit
- SpendLimit
- AuthorizationCountLimit
"MERCHANT_RESTRICTION"Where the policy attaches.
- Project
- User
- Card
Show child attributes
Show child attributes
Human-readable label.
1 - 128Block transactions whose merchant matches the criteria.
Show child attributes
Show child attributes
Response
Policy resource
- MerchantRestriction
- ChannelRestriction
- TransactionAmountLimit
- SpendLimit
- AuthorizationCountLimit
Policy ID. A UUID for your policies; a stable identifier for platform policies.
Where the policy attaches.
- Project
- User
- Card
Show child attributes
Show child attributes
ACTIVE, DISABLED "ACTIVE"
Human-readable label.
1 - 128ISO 8601 creation timestamp.
ISO 8601 last-update timestamp.
"MERCHANT_RESTRICTION"Block transactions whose merchant matches the criteria.
Show child attributes
Show child attributes