curl --request POST \
--url https://coreapi.io/api/offers/{id}/approval/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "<string>"
}
'import requests
url = "https://coreapi.io/api/offers/{id}/approval/reject"
payload = { "comment": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({comment: '<string>'})
};
fetch('https://coreapi.io/api/offers/{id}/approval/reject', 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://coreapi.io/api/offers/{id}/approval/reject",
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([
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"versionApprovalStatus": "not_required",
"requiresApproval": true,
"canCurrentUserDecide": true,
"request": {
"id": "<string>",
"status": "pending",
"step": {
"order": 123,
"requirement": "any",
"approvers": [
{
"type": "role",
"id": "<string>",
"label": "<string>"
}
],
"name": "<string>"
},
"decisions": [
{
"account": "<string>",
"decision": "approve",
"decidedAt": "2023-11-07T05:31:56Z",
"comment": "<string>"
}
],
"requestedBy": {
"id": "<string>",
"name": "<string>"
},
"requestedAt": "2023-11-07T05:31:56Z"
}
}Reject a pending request
Beta. This endpoint is unstable and may still change without notice. Pin against the dated version and watch the changelog.
Records the caller’s rejection with a required comment. The version is marked rejected and the offer stays open for a re-publish. Only a named approver may decide.
curl --request POST \
--url https://coreapi.io/api/offers/{id}/approval/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "<string>"
}
'import requests
url = "https://coreapi.io/api/offers/{id}/approval/reject"
payload = { "comment": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({comment: '<string>'})
};
fetch('https://coreapi.io/api/offers/{id}/approval/reject', 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://coreapi.io/api/offers/{id}/approval/reject",
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([
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"versionApprovalStatus": "not_required",
"requiresApproval": true,
"canCurrentUserDecide": true,
"request": {
"id": "<string>",
"status": "pending",
"step": {
"order": 123,
"requirement": "any",
"approvers": [
{
"type": "role",
"id": "<string>",
"label": "<string>"
}
],
"name": "<string>"
},
"decisions": [
{
"account": "<string>",
"decision": "approve",
"decidedAt": "2023-11-07T05:31:56Z",
"comment": "<string>"
}
],
"requestedBy": {
"id": "<string>",
"name": "<string>"
},
"requestedAt": "2023-11-07T05:31:56Z"
}
}Autorisierungen
API token of the organisation. Send it as Authorization: Bearer api_... The token is bound to exactly one organisation.
Pfadparameter
Offer ID (ULID).
Body
Required rejection rationale.
Antwort
The updated approval sub-resource.
Internal approval state of an offer. Returned only to authenticated staff, never to the recipient.
not_required, pending, approved, rejected, superseded Whether an approval workflow applies.
Whether the caller is a named approver who may decide now.
The running approval request. Null when none is pending.
Show child attributes
Show child attributes
War diese Seite hilfreich?