curl --request POST \
--url https://coreapi.io/api/offers/{id}/approval/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/offers/{id}/approval/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/api/offers/{id}/approval/cancel', 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/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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"
}
}Cancel a pending request
Beta. This endpoint is unstable and may still change without notice. Pin against the dated version and watch the changelog.
Withdraws the pending approval request (requester or a holder of the offer-write permission). The version is superseded and the offer stays open for a re-publish.
curl --request POST \
--url https://coreapi.io/api/offers/{id}/approval/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/offers/{id}/approval/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/api/offers/{id}/approval/cancel', 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/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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).
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?