Update an offer
curl --request PUT \
--url https://coreapi.io/offers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"sections": [
{}
],
"customVariables": {},
"validUntil": "2023-11-07T05:31:56Z",
"autoActivateSubscription": true
}
'import requests
url = "https://coreapi.io/offers/{id}"
payload = {
"name": "<string>",
"sections": [{}],
"customVariables": {},
"validUntil": "2023-11-07T05:31:56Z",
"autoActivateSubscription": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
sections: [{}],
customVariables: {},
validUntil: '2023-11-07T05:31:56Z',
autoActivateSubscription: true
})
};
fetch('https://coreapi.io/offers/{id}', 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/offers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'sections' => [
[
]
],
'customVariables' => [
],
'validUntil' => '2023-11-07T05:31:56Z',
'autoActivateSubscription' => true
]),
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": "open",
"acceptanceMode": "click",
"dealType": "new_business",
"autoActivateSubscription": true,
"name": "<string>",
"validUntil": "2023-11-07T05:31:56Z",
"customVariables": {}
}Offer
Update an offer
Update an existing offer
Required permissions:offer:writePUT
/
offers
/
{id}
Update an offer
curl --request PUT \
--url https://coreapi.io/offers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"sections": [
{}
],
"customVariables": {},
"validUntil": "2023-11-07T05:31:56Z",
"autoActivateSubscription": true
}
'import requests
url = "https://coreapi.io/offers/{id}"
payload = {
"name": "<string>",
"sections": [{}],
"customVariables": {},
"validUntil": "2023-11-07T05:31:56Z",
"autoActivateSubscription": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
sections: [{}],
customVariables: {},
validUntil: '2023-11-07T05:31:56Z',
autoActivateSubscription: true
})
};
fetch('https://coreapi.io/offers/{id}', 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/offers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'sections' => [
[
]
],
'customVariables' => [
],
'validUntil' => '2023-11-07T05:31:56Z',
'autoActivateSubscription' => true
]),
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": "open",
"acceptanceMode": "click",
"dealType": "new_business",
"autoActivateSubscription": true,
"name": "<string>",
"validUntil": "2023-11-07T05:31:56Z",
"customVariables": {}
}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
application/json
Partial update of a draft offer. Most fields freeze once the offer is accepted.
Antwort
The updated offer.
Verfügbare Optionen:
open, signing, awaiting_invoice_details, signed, archived Verfügbare Optionen:
click, esignature, print Verfügbare Optionen:
new_business, expansion, renewal, one_off Show child attributes
Show child attributes
War diese Seite hilfreich?