Close an offer as lost
curl --request POST \
--url https://coreapi.io/api/offers/{id}/lose \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Preis zu hoch"
}
'import requests
url = "https://coreapi.io/api/offers/{id}/lose"
payload = { "reason": "Preis zu hoch" }
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({reason: 'Preis zu hoch'})
};
fetch('https://coreapi.io/api/offers/{id}/lose', 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}/lose",
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([
'reason' => 'Preis zu hoch'
]),
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;
}{
"id": "<string>",
"status": "lost",
"closedAt": "2023-11-07T05:31:56Z",
"lostReason": "<string>"
}{
"status": 409,
"type": "ANALYTICS_FINANCE__PACK_WITHOUT_SNAPSHOT",
"title": "An error occurred",
"detail": "<string>"
}{
"status": 409,
"type": "ANALYTICS_FINANCE__PACK_WITHOUT_SNAPSHOT",
"title": "An error occurred",
"detail": "<string>"
}{
"status": 422,
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"violations": [
{
"propertyPath": "to",
"message": "Der Zeitraum darf höchstens 36 Monate umfassen.",
"code": "analytics.mrr_financials.range_too_long"
}
],
"title": "Validation Failed",
"detail": "<string>"
}Angebote schließen
Close an offer as lost
(Beta, unstable, may change) Records that the deal is lost, with the reason. Allowed while the offer is open or in signing; the offer then has the end state lost and no longer counts in the pipeline.
Required permission: offer:write.
POST
/
api
/
offers
/
{id}
/
lose
Close an offer as lost
curl --request POST \
--url https://coreapi.io/api/offers/{id}/lose \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Preis zu hoch"
}
'import requests
url = "https://coreapi.io/api/offers/{id}/lose"
payload = { "reason": "Preis zu hoch" }
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({reason: 'Preis zu hoch'})
};
fetch('https://coreapi.io/api/offers/{id}/lose', 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}/lose",
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([
'reason' => 'Preis zu hoch'
]),
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;
}{
"id": "<string>",
"status": "lost",
"closedAt": "2023-11-07T05:31:56Z",
"lostReason": "<string>"
}{
"status": 409,
"type": "ANALYTICS_FINANCE__PACK_WITHOUT_SNAPSHOT",
"title": "An error occurred",
"detail": "<string>"
}{
"status": 409,
"type": "ANALYTICS_FINANCE__PACK_WITHOUT_SNAPSHOT",
"title": "An error occurred",
"detail": "<string>"
}{
"status": 422,
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"violations": [
{
"propertyPath": "to",
"message": "Der Zeitraum darf höchstens 36 Monate umfassen.",
"code": "analytics.mrr_financials.range_too_long"
}
],
"title": "Validation Failed",
"detail": "<string>"
}Autorisierungen
Pfadparameter
Body
application/json
Antwort
The closed offer
The end state of an offer closed by the seller.
War diese Seite hilfreich?