Replace policy configuration
curl --request PUT \
--url https://sg.sandbox.api.reap.global/policies/{id}/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"type": "MERCHANT_RESTRICTION",
"config": {
"match": {
"dimension": "MCC",
"codes": [
"<string>"
]
}
}
}
'const options = {
method: 'PUT',
headers: {
'Reap-Version': '<reap-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'MERCHANT_RESTRICTION',
config: {match: {dimension: 'MCC', codes: ['<string>']}}
})
};
fetch('https://sg.sandbox.api.reap.global/policies/{id}/config', 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/{id}/config"
payload = {
"type": "MERCHANT_RESTRICTION",
"config": { "match": {
"dimension": "MCC",
"codes": ["<string>"]
} }
}
headers = {
"Reap-Version": "<reap-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(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_CONFIG_TYPE_MISMATCH",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "POLICY_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}Policies
Replace policy configuration
Replaces the configuration of a policy. The type must match the existing policy. Properties that are fixed at creation cannot be changed.
PUT
/
policies
/
{id}
/
config
Replace policy configuration
curl --request PUT \
--url https://sg.sandbox.api.reap.global/policies/{id}/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"type": "MERCHANT_RESTRICTION",
"config": {
"match": {
"dimension": "MCC",
"codes": [
"<string>"
]
}
}
}
'const options = {
method: 'PUT',
headers: {
'Reap-Version': '<reap-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'MERCHANT_RESTRICTION',
config: {match: {dimension: 'MCC', codes: ['<string>']}}
})
};
fetch('https://sg.sandbox.api.reap.global/policies/{id}/config', 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/{id}/config"
payload = {
"type": "MERCHANT_RESTRICTION",
"config": { "match": {
"dimension": "MCC",
"codes": ["<string>"]
} }
}
headers = {
"Reap-Version": "<reap-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(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_CONFIG_TYPE_MISMATCH",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "POLICY_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}Authorizations
API key as Bearer token
Headers
API version (YYYY-MM-DD)
Available options:
2025-02-14 Example:
"2025-02-14"
Path Parameters
Policy ID
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Replace a policy configuration. type must match the existing policy.
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
Available options:
ACTIVE, DISABLED Example:
"ACTIVE"
Human-readable label.
Required string length:
1 - 128ISO 8601 creation timestamp.
ISO 8601 last-update timestamp.
Allowed value:
"MERCHANT_RESTRICTION"Block transactions whose merchant matches the criteria.
Show child attributes
Show child attributes