cURL
curl -X POST \
/offer-templates \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"name": "",
"sections": [
""
],
"type": "section"
}'import requests
url = "https://coreapi.io/offer-templates"
payload = {
"name": "<string>",
"sections": ["<string>"],
"type": "section"
}
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({name: '<string>', sections: ['<string>'], type: 'section'})
};
fetch('https://coreapi.io/offer-templates', 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/offer-templates",
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([
'name' => '<string>',
'sections' => [
'<string>'
],
'type' => 'section'
]),
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;
}{
"name": "<string>",
"id": "<string>",
"sections": [
"<string>"
],
"type": "section"
}Template
Create an offer template
Create a new offer template
Required permissions:offer-template:writePOST
/
offer-templates
cURL
curl -X POST \
/offer-templates \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"name": "",
"sections": [
""
],
"type": "section"
}'import requests
url = "https://coreapi.io/offer-templates"
payload = {
"name": "<string>",
"sections": ["<string>"],
"type": "section"
}
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({name: '<string>', sections: ['<string>'], type: 'section'})
};
fetch('https://coreapi.io/offer-templates', 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/offer-templates",
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([
'name' => '<string>',
'sections' => [
'<string>'
],
'type' => 'section'
]),
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;
}{
"name": "<string>",
"id": "<string>",
"sections": [
"<string>"
],
"type": "section"
}Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/jsontext/html
The new OfferTemplate resource
War diese Seite hilfreich?