View and manage reserve rules for your sub-entities.
View and manage reserve rules for your sub-entities.
Retrieve the details of a specific reserve rule.
The sub-entity's ID.
The reserve rule ID.
Bad Request
Unauthorized
curl 'https://{prefix}.api.sandbox.checkout.com/accounts/entities/ent_w4jelhppmfiufdnatam37wrfc4/reserve-rules/rsv_qn4nis4k3ykpzzu7cvtuvhqqga' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"id": "rsv_qn4nis4k3ykpzzu7cvtuvhqqga",
"type": "rolling",
"valid_from": "2001-01-01T13:33:00.000Z",
"rolling": {
"percentage": 10,
"holding_duration": {
"weeks": 2
}
}
}Update an upcoming reserve rule. Only reserve rules that have never been active can be updated.
The sub-entity's ID.
The reserve rule ID.
Identifies a specific version of a reserve rule to update.
Unauthorized
Precondition failed. An invalid ETag value was provided in the If-Match header.
curl 'https://{prefix}.api.sandbox.checkout.com/accounts/entities/ent_w4jelhppmfiufdnatam37wrfc4/reserve-rules/rsv_qn4nis4k3ykpzzu7cvtuvhqqga' \
--request PUT \
--header 'If-Match: Y3Y9MCZydj0w' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"type": "rolling",
"rolling": {
"percentage": 10,
"holding_duration": {
"weeks": 2
}
}
}'
{
"id": "rsv_qn4nis4k3ykpzzu7cvtuvhqqga",
"_links": {
"self": {
"href": "string"
}
}
}Create a sub-entity reserve rule.
The sub-entity's ID.
A JSON payload containing the reserve rule details.
The date and time the reserve rule will come into effect. This must be at least 15 minutes in the future.
Bad Request
Unauthorized
curl 'https://{prefix}.api.sandbox.checkout.com/accounts/entities/ent_w4jelhppmfiufdnatam37wrfc4/reserve-rules' \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"type": "rolling",
"valid_from": "2001-01-01T13:33:00.000Z",
"rolling": {
"percentage": 10,
"holding_duration": {
"weeks": 2
}
}
}'
{
"id": "rsv_qn4nis4k3ykpzzu7cvtuvhqqga",
"_links": {
"self": {
"href": "string"
}
}
}Fetch all of the reserve rules for a sub-entity.
The sub-entity's ID.
Bad Request
Unauthorized
curl 'https://{prefix}.api.sandbox.checkout.com/accounts/entities/ent_w4jelhppmfiufdnatam37wrfc4/reserve-rules' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"data": [
{
"id": "rsv_qn4nis4k3ykpzzu7cvtuvhqqga",
"type": "rolling",
"valid_from": "2001-01-01T13:33:00.000Z",
"rolling": {
"percentage": 10,
"holding_duration": {
"weeks": 2
}
}
},
{
"id": "rsv_yk7nmh5jypmqzw5kb6kshj2iiy",
"type": "rolling",
"valid_from": "2001-02-01T13:33:00.000Z",
"rolling": {
"percentage": 15,
"holding_duration": {
"weeks": 4
}
}
}
]
}