curl --request POST \
--url https://api.offerclub.io/v1.0/offers \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"offer": {
"offerNumber": "<string>",
"title": "<string>",
"subtitle": "<string>",
"introduction": "<string>",
"price": 1,
"validUntil": "2023-11-07T05:31:56Z",
"clientFirstName": "<string>",
"clientLastName": "<string>",
"clientEmail": "jsmith@example.com",
"clientPhone": "<string>",
"clientCompanyName": "<string>",
"documentFileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"paymentPlans": {
"upfront": {
"enabled": true
},
"split5050": {
"enabled": true
},
"installments": {
"counts": [],
"items": [
{}
]
},
"custom": {
"enabled": true,
"items": [
{
"position": 2,
"percentage": 2,
"amount": 2,
"dueDate": "2023-11-07T05:31:56Z"
}
]
}
},
"assets": {
"faqs": {
"enabled": true,
"items": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 2
}
]
},
"banner": {
"enabled": true,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"reviews": {
"enabled": true,
"items": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 2
}
]
},
"location": {
"enabled": true,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"process": {
"enabled": true,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"media": {
"enabled": true,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"logos": {
"enabled": true,
"items": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 2
}
]
},
"callRecording": {
"enabled": true,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
'import requests
url = "https://api.offerclub.io/v1.0/offers"
payload = {
"offer": {
"offerNumber": "<string>",
"title": "<string>",
"subtitle": "<string>",
"introduction": "<string>",
"price": 1,
"validUntil": "2023-11-07T05:31:56Z",
"clientFirstName": "<string>",
"clientLastName": "<string>",
"clientEmail": "jsmith@example.com",
"clientPhone": "<string>",
"clientCompanyName": "<string>",
"documentFileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"paymentPlans": {
"upfront": { "enabled": True },
"split5050": { "enabled": True },
"installments": {
"counts": [],
"items": [{}]
},
"custom": {
"enabled": True,
"items": [
{
"position": 2,
"percentage": 2,
"amount": 2,
"dueDate": "2023-11-07T05:31:56Z"
}
]
}
},
"assets": {
"faqs": {
"enabled": True,
"items": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 2
}
]
},
"banner": {
"enabled": True,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"reviews": {
"enabled": True,
"items": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 2
}
]
},
"location": {
"enabled": True,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"process": {
"enabled": True,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"media": {
"enabled": True,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"logos": {
"enabled": True,
"items": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 2
}
]
},
"callRecording": {
"enabled": True,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
offer: {
offerNumber: '<string>',
title: '<string>',
subtitle: '<string>',
introduction: '<string>',
price: 1,
validUntil: '2023-11-07T05:31:56Z',
clientFirstName: '<string>',
clientLastName: '<string>',
clientEmail: 'jsmith@example.com',
clientPhone: '<string>',
clientCompanyName: '<string>',
documentFileId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
paymentPlans: {
upfront: {enabled: true},
split5050: {enabled: true},
installments: {counts: [], items: [{}]},
custom: {
enabled: true,
items: [{position: 2, percentage: 2, amount: 2, dueDate: '2023-11-07T05:31:56Z'}]
}
},
assets: {
faqs: {
enabled: true,
items: [{assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', position: 2}]
},
banner: {enabled: true, assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
reviews: {
enabled: true,
items: [{assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', position: 2}]
},
location: {enabled: true, assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
process: {enabled: true, assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
media: {enabled: true, assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
logos: {
enabled: true,
items: [{assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', position: 2}]
},
callRecording: {enabled: true, assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}
}
})
};
fetch('https://api.offerclub.io/v1.0/offers', 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://api.offerclub.io/v1.0/offers",
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([
'offer' => [
'offerNumber' => '<string>',
'title' => '<string>',
'subtitle' => '<string>',
'introduction' => '<string>',
'price' => 1,
'validUntil' => '2023-11-07T05:31:56Z',
'clientFirstName' => '<string>',
'clientLastName' => '<string>',
'clientEmail' => 'jsmith@example.com',
'clientPhone' => '<string>',
'clientCompanyName' => '<string>',
'documentFileId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'paymentPlans' => [
'upfront' => [
'enabled' => true
],
'split5050' => [
'enabled' => true
],
'installments' => [
'counts' => [
],
'items' => [
[
]
]
],
'custom' => [
'enabled' => true,
'items' => [
[
'position' => 2,
'percentage' => 2,
'amount' => 2,
'dueDate' => '2023-11-07T05:31:56Z'
]
]
]
],
'assets' => [
'faqs' => [
'enabled' => true,
'items' => [
[
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'position' => 2
]
]
],
'banner' => [
'enabled' => true,
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'reviews' => [
'enabled' => true,
'items' => [
[
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'position' => 2
]
]
],
'location' => [
'enabled' => true,
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'process' => [
'enabled' => true,
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'media' => [
'enabled' => true,
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'logos' => [
'enabled' => true,
'items' => [
[
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'position' => 2
]
]
],
'callRecording' => [
'enabled' => true,
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.offerclub.io/v1.0/offers"
payload := strings.NewReader("{\n \"offer\": {\n \"offerNumber\": \"<string>\",\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"introduction\": \"<string>\",\n \"price\": 1,\n \"validUntil\": \"2023-11-07T05:31:56Z\",\n \"clientFirstName\": \"<string>\",\n \"clientLastName\": \"<string>\",\n \"clientEmail\": \"jsmith@example.com\",\n \"clientPhone\": \"<string>\",\n \"clientCompanyName\": \"<string>\",\n \"documentFileId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"paymentPlans\": {\n \"upfront\": {\n \"enabled\": true\n },\n \"split5050\": {\n \"enabled\": true\n },\n \"installments\": {\n \"counts\": [],\n \"items\": [\n {}\n ]\n },\n \"custom\": {\n \"enabled\": true,\n \"items\": [\n {\n \"position\": 2,\n \"percentage\": 2,\n \"amount\": 2,\n \"dueDate\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n },\n \"assets\": {\n \"faqs\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"banner\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"reviews\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"location\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"process\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"media\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"logos\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"callRecording\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.offerclub.io/v1.0/offers")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"offer\": {\n \"offerNumber\": \"<string>\",\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"introduction\": \"<string>\",\n \"price\": 1,\n \"validUntil\": \"2023-11-07T05:31:56Z\",\n \"clientFirstName\": \"<string>\",\n \"clientLastName\": \"<string>\",\n \"clientEmail\": \"jsmith@example.com\",\n \"clientPhone\": \"<string>\",\n \"clientCompanyName\": \"<string>\",\n \"documentFileId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"paymentPlans\": {\n \"upfront\": {\n \"enabled\": true\n },\n \"split5050\": {\n \"enabled\": true\n },\n \"installments\": {\n \"counts\": [],\n \"items\": [\n {}\n ]\n },\n \"custom\": {\n \"enabled\": true,\n \"items\": [\n {\n \"position\": 2,\n \"percentage\": 2,\n \"amount\": 2,\n \"dueDate\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n },\n \"assets\": {\n \"faqs\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"banner\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"reviews\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"location\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"process\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"media\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"logos\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"callRecording\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.offerclub.io/v1.0/offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"offer\": {\n \"offerNumber\": \"<string>\",\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"introduction\": \"<string>\",\n \"price\": 1,\n \"validUntil\": \"2023-11-07T05:31:56Z\",\n \"clientFirstName\": \"<string>\",\n \"clientLastName\": \"<string>\",\n \"clientEmail\": \"jsmith@example.com\",\n \"clientPhone\": \"<string>\",\n \"clientCompanyName\": \"<string>\",\n \"documentFileId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"paymentPlans\": {\n \"upfront\": {\n \"enabled\": true\n },\n \"split5050\": {\n \"enabled\": true\n },\n \"installments\": {\n \"counts\": [],\n \"items\": [\n {}\n ]\n },\n \"custom\": {\n \"enabled\": true,\n \"items\": [\n {\n \"position\": 2,\n \"percentage\": 2,\n \"amount\": 2,\n \"dueDate\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n },\n \"assets\": {\n \"faqs\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"banner\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"reviews\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"location\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"process\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"media\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"logos\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"callRecording\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"publicId": "<string>",
"offerNumber": "<string>",
"status": "DRAFT",
"title": "<string>",
"subtitle": "<string>",
"introduction": "<string>",
"price": 123,
"validUntil": "2023-11-07T05:31:56Z",
"clientFirstName": "<string>",
"clientLastName": "<string>",
"clientEmail": "<string>",
"clientPhone": "<string>",
"clientCompanyName": "<string>",
"sentToEmail": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"wonAt": "2023-11-07T05:31:56Z",
"lostAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z",
"acceptedByFirstName": "<string>",
"acceptedByLastName": "<string>",
"acceptedByEmail": "<string>",
"acceptedByPhone": "<string>",
"signatureFileId": "<string>",
"declineReason": "NONE",
"documentFileId": "<string>",
"availableActions": {
"canUpdate": true,
"canDelete": true,
"canSend": true,
"canMarkWon": true,
"canMarkLost": true,
"canArchive": true,
"canUnarchive": true,
"canManagePaymentPlans": true,
"canManageAssets": true
},
"publicUrl": "<string>",
"signatureFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
},
"acceptedPaymentPlan": {
"id": "<string>",
"type": "UPFRONT",
"installmentCount": 123,
"computedSchedule": [
{
"position": 123,
"source": "PERCENTAGE",
"percentage": 123,
"amount": 123,
"dueDate": "2023-11-07T05:31:56Z"
}
]
},
"paymentPlans": {
"upfront": {
"id": "<string>",
"enabled": true,
"computedSchedule": [
{
"position": 123,
"source": "PERCENTAGE",
"percentage": 123,
"amount": 123,
"dueDate": "2023-11-07T05:31:56Z"
}
]
},
"split5050": {
"id": "<string>",
"enabled": true,
"computedSchedule": [
{
"position": 123,
"source": "PERCENTAGE",
"percentage": 123,
"amount": 123,
"dueDate": "2023-11-07T05:31:56Z"
}
]
},
"installments": {
"items": [
{
"id": "<string>",
"count": 3,
"enabled": true,
"computedSchedule": [
{
"position": 123,
"source": "PERCENTAGE",
"percentage": 123,
"amount": 123,
"dueDate": "2023-11-07T05:31:56Z"
}
]
}
]
},
"custom": {
"id": "<string>",
"enabled": true,
"computedSchedule": [
{
"position": 123,
"source": "PERCENTAGE",
"percentage": 123,
"amount": 123,
"dueDate": "2023-11-07T05:31:56Z"
}
]
}
},
"assets": {
"faqs": {
"isSnapshot": true,
"enabled": true,
"items": [
{
"sourceId": "<string>",
"question": "<string>",
"answer": "<string>",
"position": 123
}
]
},
"banner": {
"isSnapshot": true,
"enabled": true,
"item": {
"sourceId": "<string>",
"name": "<string>",
"title": "<string>",
"description": "<string>",
"buttonText": "<string>",
"buttonLink": "<string>",
"imageFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
}
}
},
"reviews": {
"isSnapshot": true,
"enabled": true,
"items": [
{
"sourceId": "<string>",
"name": "<string>",
"clientName": "<string>",
"clientRole": "<string>",
"title": "<string>",
"content": "<string>",
"stars": 123,
"profilePictureFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
},
"imageFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
},
"position": 123
}
]
},
"location": {
"isSnapshot": true,
"enabled": true,
"item": {
"sourceId": "<string>",
"name": "<string>",
"title": "<string>",
"description": "<string>",
"companyName": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"postalCode": "<string>",
"city": "<string>",
"country": "<string>",
"imageFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
},
"iconFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
}
}
},
"process": {
"isSnapshot": true,
"enabled": true,
"item": {
"sourceId": "<string>",
"name": "<string>",
"title": "<string>",
"steps": [
{
"index": 123,
"title": "<string>",
"description": "<string>",
"state": "DONE",
"buttonText": "<string>"
}
]
}
},
"media": {
"isSnapshot": true,
"enabled": true,
"item": {
"sourceId": "<string>",
"name": "<string>",
"url": "<string>",
"videoProvider": "YOUTUBE"
}
},
"logos": {
"isSnapshot": true,
"enabled": true,
"items": [
{
"sourceId": "<string>",
"name": "<string>",
"imageFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
},
"position": 123
}
]
},
"callRecording": {
"isSnapshot": true,
"enabled": true,
"item": {
"sourceId": "<string>",
"name": "<string>",
"url": "<string>",
"videoProvider": "YOUTUBE"
}
}
}
}{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
"email must be a string"
]
}
}{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
"email must be a string"
]
}
}{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
"email must be a string"
]
}
}{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
"email must be a string"
]
}
}{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
"email must be a string"
]
}
}{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
"email must be a string"
]
}
}Create an offer with payment plans + assets in one atomic call.
curl --request POST \
--url https://api.offerclub.io/v1.0/offers \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"offer": {
"offerNumber": "<string>",
"title": "<string>",
"subtitle": "<string>",
"introduction": "<string>",
"price": 1,
"validUntil": "2023-11-07T05:31:56Z",
"clientFirstName": "<string>",
"clientLastName": "<string>",
"clientEmail": "jsmith@example.com",
"clientPhone": "<string>",
"clientCompanyName": "<string>",
"documentFileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"paymentPlans": {
"upfront": {
"enabled": true
},
"split5050": {
"enabled": true
},
"installments": {
"counts": [],
"items": [
{}
]
},
"custom": {
"enabled": true,
"items": [
{
"position": 2,
"percentage": 2,
"amount": 2,
"dueDate": "2023-11-07T05:31:56Z"
}
]
}
},
"assets": {
"faqs": {
"enabled": true,
"items": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 2
}
]
},
"banner": {
"enabled": true,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"reviews": {
"enabled": true,
"items": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 2
}
]
},
"location": {
"enabled": true,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"process": {
"enabled": true,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"media": {
"enabled": true,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"logos": {
"enabled": true,
"items": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 2
}
]
},
"callRecording": {
"enabled": true,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
'import requests
url = "https://api.offerclub.io/v1.0/offers"
payload = {
"offer": {
"offerNumber": "<string>",
"title": "<string>",
"subtitle": "<string>",
"introduction": "<string>",
"price": 1,
"validUntil": "2023-11-07T05:31:56Z",
"clientFirstName": "<string>",
"clientLastName": "<string>",
"clientEmail": "jsmith@example.com",
"clientPhone": "<string>",
"clientCompanyName": "<string>",
"documentFileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"paymentPlans": {
"upfront": { "enabled": True },
"split5050": { "enabled": True },
"installments": {
"counts": [],
"items": [{}]
},
"custom": {
"enabled": True,
"items": [
{
"position": 2,
"percentage": 2,
"amount": 2,
"dueDate": "2023-11-07T05:31:56Z"
}
]
}
},
"assets": {
"faqs": {
"enabled": True,
"items": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 2
}
]
},
"banner": {
"enabled": True,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"reviews": {
"enabled": True,
"items": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 2
}
]
},
"location": {
"enabled": True,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"process": {
"enabled": True,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"media": {
"enabled": True,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"logos": {
"enabled": True,
"items": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 2
}
]
},
"callRecording": {
"enabled": True,
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
offer: {
offerNumber: '<string>',
title: '<string>',
subtitle: '<string>',
introduction: '<string>',
price: 1,
validUntil: '2023-11-07T05:31:56Z',
clientFirstName: '<string>',
clientLastName: '<string>',
clientEmail: 'jsmith@example.com',
clientPhone: '<string>',
clientCompanyName: '<string>',
documentFileId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
paymentPlans: {
upfront: {enabled: true},
split5050: {enabled: true},
installments: {counts: [], items: [{}]},
custom: {
enabled: true,
items: [{position: 2, percentage: 2, amount: 2, dueDate: '2023-11-07T05:31:56Z'}]
}
},
assets: {
faqs: {
enabled: true,
items: [{assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', position: 2}]
},
banner: {enabled: true, assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
reviews: {
enabled: true,
items: [{assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', position: 2}]
},
location: {enabled: true, assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
process: {enabled: true, assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
media: {enabled: true, assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
logos: {
enabled: true,
items: [{assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', position: 2}]
},
callRecording: {enabled: true, assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}
}
})
};
fetch('https://api.offerclub.io/v1.0/offers', 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://api.offerclub.io/v1.0/offers",
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([
'offer' => [
'offerNumber' => '<string>',
'title' => '<string>',
'subtitle' => '<string>',
'introduction' => '<string>',
'price' => 1,
'validUntil' => '2023-11-07T05:31:56Z',
'clientFirstName' => '<string>',
'clientLastName' => '<string>',
'clientEmail' => 'jsmith@example.com',
'clientPhone' => '<string>',
'clientCompanyName' => '<string>',
'documentFileId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'paymentPlans' => [
'upfront' => [
'enabled' => true
],
'split5050' => [
'enabled' => true
],
'installments' => [
'counts' => [
],
'items' => [
[
]
]
],
'custom' => [
'enabled' => true,
'items' => [
[
'position' => 2,
'percentage' => 2,
'amount' => 2,
'dueDate' => '2023-11-07T05:31:56Z'
]
]
]
],
'assets' => [
'faqs' => [
'enabled' => true,
'items' => [
[
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'position' => 2
]
]
],
'banner' => [
'enabled' => true,
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'reviews' => [
'enabled' => true,
'items' => [
[
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'position' => 2
]
]
],
'location' => [
'enabled' => true,
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'process' => [
'enabled' => true,
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'media' => [
'enabled' => true,
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'logos' => [
'enabled' => true,
'items' => [
[
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'position' => 2
]
]
],
'callRecording' => [
'enabled' => true,
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.offerclub.io/v1.0/offers"
payload := strings.NewReader("{\n \"offer\": {\n \"offerNumber\": \"<string>\",\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"introduction\": \"<string>\",\n \"price\": 1,\n \"validUntil\": \"2023-11-07T05:31:56Z\",\n \"clientFirstName\": \"<string>\",\n \"clientLastName\": \"<string>\",\n \"clientEmail\": \"jsmith@example.com\",\n \"clientPhone\": \"<string>\",\n \"clientCompanyName\": \"<string>\",\n \"documentFileId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"paymentPlans\": {\n \"upfront\": {\n \"enabled\": true\n },\n \"split5050\": {\n \"enabled\": true\n },\n \"installments\": {\n \"counts\": [],\n \"items\": [\n {}\n ]\n },\n \"custom\": {\n \"enabled\": true,\n \"items\": [\n {\n \"position\": 2,\n \"percentage\": 2,\n \"amount\": 2,\n \"dueDate\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n },\n \"assets\": {\n \"faqs\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"banner\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"reviews\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"location\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"process\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"media\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"logos\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"callRecording\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.offerclub.io/v1.0/offers")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"offer\": {\n \"offerNumber\": \"<string>\",\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"introduction\": \"<string>\",\n \"price\": 1,\n \"validUntil\": \"2023-11-07T05:31:56Z\",\n \"clientFirstName\": \"<string>\",\n \"clientLastName\": \"<string>\",\n \"clientEmail\": \"jsmith@example.com\",\n \"clientPhone\": \"<string>\",\n \"clientCompanyName\": \"<string>\",\n \"documentFileId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"paymentPlans\": {\n \"upfront\": {\n \"enabled\": true\n },\n \"split5050\": {\n \"enabled\": true\n },\n \"installments\": {\n \"counts\": [],\n \"items\": [\n {}\n ]\n },\n \"custom\": {\n \"enabled\": true,\n \"items\": [\n {\n \"position\": 2,\n \"percentage\": 2,\n \"amount\": 2,\n \"dueDate\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n },\n \"assets\": {\n \"faqs\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"banner\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"reviews\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"location\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"process\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"media\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"logos\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"callRecording\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.offerclub.io/v1.0/offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"offer\": {\n \"offerNumber\": \"<string>\",\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"introduction\": \"<string>\",\n \"price\": 1,\n \"validUntil\": \"2023-11-07T05:31:56Z\",\n \"clientFirstName\": \"<string>\",\n \"clientLastName\": \"<string>\",\n \"clientEmail\": \"jsmith@example.com\",\n \"clientPhone\": \"<string>\",\n \"clientCompanyName\": \"<string>\",\n \"documentFileId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"paymentPlans\": {\n \"upfront\": {\n \"enabled\": true\n },\n \"split5050\": {\n \"enabled\": true\n },\n \"installments\": {\n \"counts\": [],\n \"items\": [\n {}\n ]\n },\n \"custom\": {\n \"enabled\": true,\n \"items\": [\n {\n \"position\": 2,\n \"percentage\": 2,\n \"amount\": 2,\n \"dueDate\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n },\n \"assets\": {\n \"faqs\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"banner\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"reviews\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"location\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"process\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"media\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"logos\": {\n \"enabled\": true,\n \"items\": [\n {\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": 2\n }\n ]\n },\n \"callRecording\": {\n \"enabled\": true,\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"publicId": "<string>",
"offerNumber": "<string>",
"status": "DRAFT",
"title": "<string>",
"subtitle": "<string>",
"introduction": "<string>",
"price": 123,
"validUntil": "2023-11-07T05:31:56Z",
"clientFirstName": "<string>",
"clientLastName": "<string>",
"clientEmail": "<string>",
"clientPhone": "<string>",
"clientCompanyName": "<string>",
"sentToEmail": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"wonAt": "2023-11-07T05:31:56Z",
"lostAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z",
"acceptedByFirstName": "<string>",
"acceptedByLastName": "<string>",
"acceptedByEmail": "<string>",
"acceptedByPhone": "<string>",
"signatureFileId": "<string>",
"declineReason": "NONE",
"documentFileId": "<string>",
"availableActions": {
"canUpdate": true,
"canDelete": true,
"canSend": true,
"canMarkWon": true,
"canMarkLost": true,
"canArchive": true,
"canUnarchive": true,
"canManagePaymentPlans": true,
"canManageAssets": true
},
"publicUrl": "<string>",
"signatureFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
},
"acceptedPaymentPlan": {
"id": "<string>",
"type": "UPFRONT",
"installmentCount": 123,
"computedSchedule": [
{
"position": 123,
"source": "PERCENTAGE",
"percentage": 123,
"amount": 123,
"dueDate": "2023-11-07T05:31:56Z"
}
]
},
"paymentPlans": {
"upfront": {
"id": "<string>",
"enabled": true,
"computedSchedule": [
{
"position": 123,
"source": "PERCENTAGE",
"percentage": 123,
"amount": 123,
"dueDate": "2023-11-07T05:31:56Z"
}
]
},
"split5050": {
"id": "<string>",
"enabled": true,
"computedSchedule": [
{
"position": 123,
"source": "PERCENTAGE",
"percentage": 123,
"amount": 123,
"dueDate": "2023-11-07T05:31:56Z"
}
]
},
"installments": {
"items": [
{
"id": "<string>",
"count": 3,
"enabled": true,
"computedSchedule": [
{
"position": 123,
"source": "PERCENTAGE",
"percentage": 123,
"amount": 123,
"dueDate": "2023-11-07T05:31:56Z"
}
]
}
]
},
"custom": {
"id": "<string>",
"enabled": true,
"computedSchedule": [
{
"position": 123,
"source": "PERCENTAGE",
"percentage": 123,
"amount": 123,
"dueDate": "2023-11-07T05:31:56Z"
}
]
}
},
"assets": {
"faqs": {
"isSnapshot": true,
"enabled": true,
"items": [
{
"sourceId": "<string>",
"question": "<string>",
"answer": "<string>",
"position": 123
}
]
},
"banner": {
"isSnapshot": true,
"enabled": true,
"item": {
"sourceId": "<string>",
"name": "<string>",
"title": "<string>",
"description": "<string>",
"buttonText": "<string>",
"buttonLink": "<string>",
"imageFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
}
}
},
"reviews": {
"isSnapshot": true,
"enabled": true,
"items": [
{
"sourceId": "<string>",
"name": "<string>",
"clientName": "<string>",
"clientRole": "<string>",
"title": "<string>",
"content": "<string>",
"stars": 123,
"profilePictureFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
},
"imageFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
},
"position": 123
}
]
},
"location": {
"isSnapshot": true,
"enabled": true,
"item": {
"sourceId": "<string>",
"name": "<string>",
"title": "<string>",
"description": "<string>",
"companyName": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"postalCode": "<string>",
"city": "<string>",
"country": "<string>",
"imageFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
},
"iconFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
}
}
},
"process": {
"isSnapshot": true,
"enabled": true,
"item": {
"sourceId": "<string>",
"name": "<string>",
"title": "<string>",
"steps": [
{
"index": 123,
"title": "<string>",
"description": "<string>",
"state": "DONE",
"buttonText": "<string>"
}
]
}
},
"media": {
"isSnapshot": true,
"enabled": true,
"item": {
"sourceId": "<string>",
"name": "<string>",
"url": "<string>",
"videoProvider": "YOUTUBE"
}
},
"logos": {
"isSnapshot": true,
"enabled": true,
"items": [
{
"sourceId": "<string>",
"name": "<string>",
"imageFileThumbnail": {
"thumbnailWidth": 123,
"thumbnailHeight": 123,
"thumbnailUrl": "<string>",
"thumbnailUrlExpiresAt": "2023-11-07T05:31:56Z"
},
"position": 123
}
]
},
"callRecording": {
"isSnapshot": true,
"enabled": true,
"item": {
"sourceId": "<string>",
"name": "<string>",
"url": "<string>",
"videoProvider": "YOUTUBE"
}
}
}
}{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
"email must be a string"
]
}
}{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
"email must be a string"
]
}
}{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
"email must be a string"
]
}
}{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
"email must be a string"
]
}
}{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
"email must be a string"
]
}
}{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
"email must be a string"
]
}
}Authorizations
API key for authentication (can be generated in the settings)
Body
Response
Offer created — returns the full envelope
The ID of the element
The created at date of the element
The updated at date of the element
Short URL-safe identifier used in the public share link
User-set business reference number
Current offer status
DRAFT, SENT, WON, LOST Offer title shown to the client
Subtitle shown beneath the title
Introductory text shown at the top of the offer page
Total offer price in the smallest currency unit (cents)
Date until which the offer is valid
Client first name
Client last name
Client email address
Client phone number
Client company name
Email address the offer was actually sent to (snapshot at send-time)
Timestamp when the offer was sent
Timestamp when the offer was marked as won
Timestamp when the offer was marked as lost
Timestamp when the offer was archived
First name of the person who accepted the offer via the public surface
Last name of the person who accepted the offer via the public surface
Email of the person who accepted the offer
Phone number of the person who accepted the offer
File ID of the captured signature image
Reason given by the recipient when declining the offer (NONE if no reason provided)
NONE, TOO_EXPENSIVE, OTHER_PRIORITIES, TIMELINE, MISSING_EXPERTISE, PERSONAL_FIT File ID of the attached PDF document
Server-computed map of dashboard actions the caller may currently perform on this offer
Show child attributes
Show child attributes
Fully constructed public share URL (includes the auth token) - null if the offer is not sent yet
Thumbnail of the captured signature — null when no signature is attached (offer not yet accepted via the public surface)
Show child attributes
Show child attributes
The plan the recipient chose at accept-time — null until the offer is accepted (WON). All other plans are fetched via GET /offers/:offerId/payment-plans.
Show child attributes
Show child attributes
Grouped payment-plans snapshot for the offer. Same shape as GET /offers/:offerId/payment-plans.
Show child attributes
Show child attributes
Grouped assets snapshot for the offer. Same shape as GET /offers/:offerId/assets.
Show child attributes
Show child attributes
Was this page helpful?