Approve a pending request
curl --request POST \
--url https://coreapi.io/api/offers/{id}/approval/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "<string>"
}
'import requests
url = "https://coreapi.io/api/offers/{id}/approval/approve"
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/approve', 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/approve",
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"
}
}Freigabe
Approve 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 approval. On full quorum the version goes live and the offer auto-releases for signing. Only a named approver may decide.
POST
/
api
/
offers
/
{id}
/
approval
/
approve
Approve a pending request
curl --request POST \
--url https://coreapi.io/api/offers/{id}/approval/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "<string>"
}
'import requests
url = "https://coreapi.io/api/offers/{id}/approval/approve"
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/approve', 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/approve",
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
Antwort
The updated approval sub-resource.
Internal approval state of an offer. Returned only to authenticated staff, never to the recipient.
War diese Seite hilfreich?