curl --request POST \
--url https://api.chargecloud.dev/api/v1/crm/contracts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"business": false,
"salutation": 123,
"firstname": "<string>",
"surname": "<string>",
"street": "<string>",
"house_number": "<string>",
"zip": "<string>",
"city": "<string>",
"country_id": 123,
"billing_salutation": 123,
"billing_firstname": "<string>",
"billing_surname": "<string>",
"billing_street": "<string>",
"billing_house_number": "<string>",
"billing_zip": "<string>",
"billing_city": "<string>",
"billing_email": "<string>",
"billing_phone": "<string>",
"ext_contract_id": "<string>",
"external_customer_id": "<string>",
"customer_group_id": 123,
"company_name": "<string>",
"company_name_addendum": "<string>",
"title": "<string>",
"date_of_birth": "2023-12-25",
"phone_home": "<string>",
"phone_home_area_code": "<string>",
"phone_mobile": "<string>",
"phone_mobile_area_code": "<string>",
"phone_business": "<string>",
"phone_business_area_code": "<string>",
"email_private": "<string>",
"email_business": "<string>",
"reference_field_1": "<string>",
"reference_field_2": "<string>",
"billing_company": "<string>",
"billing_title": "<string>",
"billing_country_id": 123,
"billing_fax": "<string>",
"vehicle_manufacturer": "<string>",
"vehicle_model": "<string>",
"vehicle_license_plate": "<string>",
"vehicle_country_of_registration_id": 123,
"auth_username": "<string>",
"auth_password": "<string>",
"advertising_agreement_mail": false,
"advertising_agreement_phone": false,
"advertising_agreement_email": false,
"accept_current_agb": false,
"accept_current_privacy_policy": false,
"vat_identification_number": "<string>",
"tax_code": "<string>",
"simulation": false,
"start_date": "2023-12-25",
"attributes": "<string>"
}
'import requests
url = "https://api.chargecloud.dev/api/v1/crm/contracts"
payload = {
"business": False,
"salutation": 123,
"firstname": "<string>",
"surname": "<string>",
"street": "<string>",
"house_number": "<string>",
"zip": "<string>",
"city": "<string>",
"country_id": 123,
"billing_salutation": 123,
"billing_firstname": "<string>",
"billing_surname": "<string>",
"billing_street": "<string>",
"billing_house_number": "<string>",
"billing_zip": "<string>",
"billing_city": "<string>",
"billing_email": "<string>",
"billing_phone": "<string>",
"ext_contract_id": "<string>",
"external_customer_id": "<string>",
"customer_group_id": 123,
"company_name": "<string>",
"company_name_addendum": "<string>",
"title": "<string>",
"date_of_birth": "2023-12-25",
"phone_home": "<string>",
"phone_home_area_code": "<string>",
"phone_mobile": "<string>",
"phone_mobile_area_code": "<string>",
"phone_business": "<string>",
"phone_business_area_code": "<string>",
"email_private": "<string>",
"email_business": "<string>",
"reference_field_1": "<string>",
"reference_field_2": "<string>",
"billing_company": "<string>",
"billing_title": "<string>",
"billing_country_id": 123,
"billing_fax": "<string>",
"vehicle_manufacturer": "<string>",
"vehicle_model": "<string>",
"vehicle_license_plate": "<string>",
"vehicle_country_of_registration_id": 123,
"auth_username": "<string>",
"auth_password": "<string>",
"advertising_agreement_mail": False,
"advertising_agreement_phone": False,
"advertising_agreement_email": False,
"accept_current_agb": False,
"accept_current_privacy_policy": False,
"vat_identification_number": "<string>",
"tax_code": "<string>",
"simulation": False,
"start_date": "2023-12-25",
"attributes": "<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({
business: false,
salutation: 123,
firstname: '<string>',
surname: '<string>',
street: '<string>',
house_number: '<string>',
zip: '<string>',
city: '<string>',
country_id: 123,
billing_salutation: 123,
billing_firstname: '<string>',
billing_surname: '<string>',
billing_street: '<string>',
billing_house_number: '<string>',
billing_zip: '<string>',
billing_city: '<string>',
billing_email: '<string>',
billing_phone: '<string>',
ext_contract_id: '<string>',
external_customer_id: '<string>',
customer_group_id: 123,
company_name: '<string>',
company_name_addendum: '<string>',
title: '<string>',
date_of_birth: '2023-12-25',
phone_home: '<string>',
phone_home_area_code: '<string>',
phone_mobile: '<string>',
phone_mobile_area_code: '<string>',
phone_business: '<string>',
phone_business_area_code: '<string>',
email_private: '<string>',
email_business: '<string>',
reference_field_1: '<string>',
reference_field_2: '<string>',
billing_company: '<string>',
billing_title: '<string>',
billing_country_id: 123,
billing_fax: '<string>',
vehicle_manufacturer: '<string>',
vehicle_model: '<string>',
vehicle_license_plate: '<string>',
vehicle_country_of_registration_id: 123,
auth_username: '<string>',
auth_password: '<string>',
advertising_agreement_mail: false,
advertising_agreement_phone: false,
advertising_agreement_email: false,
accept_current_agb: false,
accept_current_privacy_policy: false,
vat_identification_number: '<string>',
tax_code: '<string>',
simulation: false,
start_date: '2023-12-25',
attributes: '<string>'
})
};
fetch('https://api.chargecloud.dev/api/v1/crm/contracts', 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.chargecloud.dev/api/v1/crm/contracts",
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([
'business' => false,
'salutation' => 123,
'firstname' => '<string>',
'surname' => '<string>',
'street' => '<string>',
'house_number' => '<string>',
'zip' => '<string>',
'city' => '<string>',
'country_id' => 123,
'billing_salutation' => 123,
'billing_firstname' => '<string>',
'billing_surname' => '<string>',
'billing_street' => '<string>',
'billing_house_number' => '<string>',
'billing_zip' => '<string>',
'billing_city' => '<string>',
'billing_email' => '<string>',
'billing_phone' => '<string>',
'ext_contract_id' => '<string>',
'external_customer_id' => '<string>',
'customer_group_id' => 123,
'company_name' => '<string>',
'company_name_addendum' => '<string>',
'title' => '<string>',
'date_of_birth' => '2023-12-25',
'phone_home' => '<string>',
'phone_home_area_code' => '<string>',
'phone_mobile' => '<string>',
'phone_mobile_area_code' => '<string>',
'phone_business' => '<string>',
'phone_business_area_code' => '<string>',
'email_private' => '<string>',
'email_business' => '<string>',
'reference_field_1' => '<string>',
'reference_field_2' => '<string>',
'billing_company' => '<string>',
'billing_title' => '<string>',
'billing_country_id' => 123,
'billing_fax' => '<string>',
'vehicle_manufacturer' => '<string>',
'vehicle_model' => '<string>',
'vehicle_license_plate' => '<string>',
'vehicle_country_of_registration_id' => 123,
'auth_username' => '<string>',
'auth_password' => '<string>',
'advertising_agreement_mail' => false,
'advertising_agreement_phone' => false,
'advertising_agreement_email' => false,
'accept_current_agb' => false,
'accept_current_privacy_policy' => false,
'vat_identification_number' => '<string>',
'tax_code' => '<string>',
'simulation' => false,
'start_date' => '2023-12-25',
'attributes' => '<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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.chargecloud.dev/api/v1/crm/contracts"
payload := strings.NewReader("{\n \"business\": false,\n \"salutation\": 123,\n \"firstname\": \"<string>\",\n \"surname\": \"<string>\",\n \"street\": \"<string>\",\n \"house_number\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country_id\": 123,\n \"billing_salutation\": 123,\n \"billing_firstname\": \"<string>\",\n \"billing_surname\": \"<string>\",\n \"billing_street\": \"<string>\",\n \"billing_house_number\": \"<string>\",\n \"billing_zip\": \"<string>\",\n \"billing_city\": \"<string>\",\n \"billing_email\": \"<string>\",\n \"billing_phone\": \"<string>\",\n \"ext_contract_id\": \"<string>\",\n \"external_customer_id\": \"<string>\",\n \"customer_group_id\": 123,\n \"company_name\": \"<string>\",\n \"company_name_addendum\": \"<string>\",\n \"title\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_home\": \"<string>\",\n \"phone_home_area_code\": \"<string>\",\n \"phone_mobile\": \"<string>\",\n \"phone_mobile_area_code\": \"<string>\",\n \"phone_business\": \"<string>\",\n \"phone_business_area_code\": \"<string>\",\n \"email_private\": \"<string>\",\n \"email_business\": \"<string>\",\n \"reference_field_1\": \"<string>\",\n \"reference_field_2\": \"<string>\",\n \"billing_company\": \"<string>\",\n \"billing_title\": \"<string>\",\n \"billing_country_id\": 123,\n \"billing_fax\": \"<string>\",\n \"vehicle_manufacturer\": \"<string>\",\n \"vehicle_model\": \"<string>\",\n \"vehicle_license_plate\": \"<string>\",\n \"vehicle_country_of_registration_id\": 123,\n \"auth_username\": \"<string>\",\n \"auth_password\": \"<string>\",\n \"advertising_agreement_mail\": false,\n \"advertising_agreement_phone\": false,\n \"advertising_agreement_email\": false,\n \"accept_current_agb\": false,\n \"accept_current_privacy_policy\": false,\n \"vat_identification_number\": \"<string>\",\n \"tax_code\": \"<string>\",\n \"simulation\": false,\n \"start_date\": \"2023-12-25\",\n \"attributes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.chargecloud.dev/api/v1/crm/contracts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"business\": false,\n \"salutation\": 123,\n \"firstname\": \"<string>\",\n \"surname\": \"<string>\",\n \"street\": \"<string>\",\n \"house_number\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country_id\": 123,\n \"billing_salutation\": 123,\n \"billing_firstname\": \"<string>\",\n \"billing_surname\": \"<string>\",\n \"billing_street\": \"<string>\",\n \"billing_house_number\": \"<string>\",\n \"billing_zip\": \"<string>\",\n \"billing_city\": \"<string>\",\n \"billing_email\": \"<string>\",\n \"billing_phone\": \"<string>\",\n \"ext_contract_id\": \"<string>\",\n \"external_customer_id\": \"<string>\",\n \"customer_group_id\": 123,\n \"company_name\": \"<string>\",\n \"company_name_addendum\": \"<string>\",\n \"title\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_home\": \"<string>\",\n \"phone_home_area_code\": \"<string>\",\n \"phone_mobile\": \"<string>\",\n \"phone_mobile_area_code\": \"<string>\",\n \"phone_business\": \"<string>\",\n \"phone_business_area_code\": \"<string>\",\n \"email_private\": \"<string>\",\n \"email_business\": \"<string>\",\n \"reference_field_1\": \"<string>\",\n \"reference_field_2\": \"<string>\",\n \"billing_company\": \"<string>\",\n \"billing_title\": \"<string>\",\n \"billing_country_id\": 123,\n \"billing_fax\": \"<string>\",\n \"vehicle_manufacturer\": \"<string>\",\n \"vehicle_model\": \"<string>\",\n \"vehicle_license_plate\": \"<string>\",\n \"vehicle_country_of_registration_id\": 123,\n \"auth_username\": \"<string>\",\n \"auth_password\": \"<string>\",\n \"advertising_agreement_mail\": false,\n \"advertising_agreement_phone\": false,\n \"advertising_agreement_email\": false,\n \"accept_current_agb\": false,\n \"accept_current_privacy_policy\": false,\n \"vat_identification_number\": \"<string>\",\n \"tax_code\": \"<string>\",\n \"simulation\": false,\n \"start_date\": \"2023-12-25\",\n \"attributes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chargecloud.dev/api/v1/crm/contracts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"business\": false,\n \"salutation\": 123,\n \"firstname\": \"<string>\",\n \"surname\": \"<string>\",\n \"street\": \"<string>\",\n \"house_number\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country_id\": 123,\n \"billing_salutation\": 123,\n \"billing_firstname\": \"<string>\",\n \"billing_surname\": \"<string>\",\n \"billing_street\": \"<string>\",\n \"billing_house_number\": \"<string>\",\n \"billing_zip\": \"<string>\",\n \"billing_city\": \"<string>\",\n \"billing_email\": \"<string>\",\n \"billing_phone\": \"<string>\",\n \"ext_contract_id\": \"<string>\",\n \"external_customer_id\": \"<string>\",\n \"customer_group_id\": 123,\n \"company_name\": \"<string>\",\n \"company_name_addendum\": \"<string>\",\n \"title\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_home\": \"<string>\",\n \"phone_home_area_code\": \"<string>\",\n \"phone_mobile\": \"<string>\",\n \"phone_mobile_area_code\": \"<string>\",\n \"phone_business\": \"<string>\",\n \"phone_business_area_code\": \"<string>\",\n \"email_private\": \"<string>\",\n \"email_business\": \"<string>\",\n \"reference_field_1\": \"<string>\",\n \"reference_field_2\": \"<string>\",\n \"billing_company\": \"<string>\",\n \"billing_title\": \"<string>\",\n \"billing_country_id\": 123,\n \"billing_fax\": \"<string>\",\n \"vehicle_manufacturer\": \"<string>\",\n \"vehicle_model\": \"<string>\",\n \"vehicle_license_plate\": \"<string>\",\n \"vehicle_country_of_registration_id\": 123,\n \"auth_username\": \"<string>\",\n \"auth_password\": \"<string>\",\n \"advertising_agreement_mail\": false,\n \"advertising_agreement_phone\": false,\n \"advertising_agreement_email\": false,\n \"accept_current_agb\": false,\n \"accept_current_privacy_policy\": false,\n \"vat_identification_number\": \"<string>\",\n \"tax_code\": \"<string>\",\n \"simulation\": false,\n \"start_date\": \"2023-12-25\",\n \"attributes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"contract": {
"uuid": "<string>",
"is_locked": false,
"billing_blocked": false,
"dunning_locked": false,
"billable": false,
"account_id": 123,
"campaign_id": 123,
"business": false,
"salutation": 123,
"firstname": "<string>",
"surname": "<string>",
"street": "<string>",
"house_number": "<string>",
"zip": "<string>",
"city": "<string>",
"phone": "<string>",
"fax": "<string>",
"email": "<string>",
"billing_salutation": 123,
"billing_firstname": "<string>",
"billing_surname": "<string>",
"billing_street": "<string>",
"billing_house_number": "<string>",
"billing_zip": "<string>",
"billing_city": "<string>",
"billing_email": "<string>",
"billing_phone": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"ordered_at": "2023-11-07T05:31:56Z",
"modification_date": "2023-11-07T05:31:56Z",
"ext_contract_id": "<string>",
"external_id": "<string>",
"customer_group_id": 123,
"company_name": "<string>",
"country_id": 123,
"reference_field_1": "<string>",
"reference_field_2": "<string>",
"billing_company": "<string>",
"billing_title": "<string>",
"billing_country_id": 123,
"billing_fax": "<string>",
"title": "<string>",
"tax_code": "<string>",
"external_customer_id": "<string>",
"auth_enabled": false,
"auth_username": "<string>",
"phone_home": "<string>",
"phone_home_area_code": "<string>",
"phone_mobile": "<string>",
"phone_mobile_area_code": "<string>",
"phone_business": "<string>",
"phone_business_area_code": "<string>",
"email_private": "<string>",
"email_business": "<string>",
"vehicle_manufacturer": "<string>",
"vehicle_model": "<string>",
"vehicle_license_plate": "<string>",
"vehicle_country_of_registration_id": 123,
"advertising_agreement_mail": false,
"advertising_agreement_phone": false,
"advertising_agreement_email": false,
"accept_current_agb": false,
"accept_current_privacy_policy": false
},
"customer_id": 123,
"external_customer_id": "<string>",
"mail_verification_needed": false,
"contract_confirmation_needed": false
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"errors": [
{
"errorKey": "<string>",
"message": "<string>",
"parameter": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}Creates a contract
Creates a contract. Required permission: crm:contract:create
curl --request POST \
--url https://api.chargecloud.dev/api/v1/crm/contracts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"business": false,
"salutation": 123,
"firstname": "<string>",
"surname": "<string>",
"street": "<string>",
"house_number": "<string>",
"zip": "<string>",
"city": "<string>",
"country_id": 123,
"billing_salutation": 123,
"billing_firstname": "<string>",
"billing_surname": "<string>",
"billing_street": "<string>",
"billing_house_number": "<string>",
"billing_zip": "<string>",
"billing_city": "<string>",
"billing_email": "<string>",
"billing_phone": "<string>",
"ext_contract_id": "<string>",
"external_customer_id": "<string>",
"customer_group_id": 123,
"company_name": "<string>",
"company_name_addendum": "<string>",
"title": "<string>",
"date_of_birth": "2023-12-25",
"phone_home": "<string>",
"phone_home_area_code": "<string>",
"phone_mobile": "<string>",
"phone_mobile_area_code": "<string>",
"phone_business": "<string>",
"phone_business_area_code": "<string>",
"email_private": "<string>",
"email_business": "<string>",
"reference_field_1": "<string>",
"reference_field_2": "<string>",
"billing_company": "<string>",
"billing_title": "<string>",
"billing_country_id": 123,
"billing_fax": "<string>",
"vehicle_manufacturer": "<string>",
"vehicle_model": "<string>",
"vehicle_license_plate": "<string>",
"vehicle_country_of_registration_id": 123,
"auth_username": "<string>",
"auth_password": "<string>",
"advertising_agreement_mail": false,
"advertising_agreement_phone": false,
"advertising_agreement_email": false,
"accept_current_agb": false,
"accept_current_privacy_policy": false,
"vat_identification_number": "<string>",
"tax_code": "<string>",
"simulation": false,
"start_date": "2023-12-25",
"attributes": "<string>"
}
'import requests
url = "https://api.chargecloud.dev/api/v1/crm/contracts"
payload = {
"business": False,
"salutation": 123,
"firstname": "<string>",
"surname": "<string>",
"street": "<string>",
"house_number": "<string>",
"zip": "<string>",
"city": "<string>",
"country_id": 123,
"billing_salutation": 123,
"billing_firstname": "<string>",
"billing_surname": "<string>",
"billing_street": "<string>",
"billing_house_number": "<string>",
"billing_zip": "<string>",
"billing_city": "<string>",
"billing_email": "<string>",
"billing_phone": "<string>",
"ext_contract_id": "<string>",
"external_customer_id": "<string>",
"customer_group_id": 123,
"company_name": "<string>",
"company_name_addendum": "<string>",
"title": "<string>",
"date_of_birth": "2023-12-25",
"phone_home": "<string>",
"phone_home_area_code": "<string>",
"phone_mobile": "<string>",
"phone_mobile_area_code": "<string>",
"phone_business": "<string>",
"phone_business_area_code": "<string>",
"email_private": "<string>",
"email_business": "<string>",
"reference_field_1": "<string>",
"reference_field_2": "<string>",
"billing_company": "<string>",
"billing_title": "<string>",
"billing_country_id": 123,
"billing_fax": "<string>",
"vehicle_manufacturer": "<string>",
"vehicle_model": "<string>",
"vehicle_license_plate": "<string>",
"vehicle_country_of_registration_id": 123,
"auth_username": "<string>",
"auth_password": "<string>",
"advertising_agreement_mail": False,
"advertising_agreement_phone": False,
"advertising_agreement_email": False,
"accept_current_agb": False,
"accept_current_privacy_policy": False,
"vat_identification_number": "<string>",
"tax_code": "<string>",
"simulation": False,
"start_date": "2023-12-25",
"attributes": "<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({
business: false,
salutation: 123,
firstname: '<string>',
surname: '<string>',
street: '<string>',
house_number: '<string>',
zip: '<string>',
city: '<string>',
country_id: 123,
billing_salutation: 123,
billing_firstname: '<string>',
billing_surname: '<string>',
billing_street: '<string>',
billing_house_number: '<string>',
billing_zip: '<string>',
billing_city: '<string>',
billing_email: '<string>',
billing_phone: '<string>',
ext_contract_id: '<string>',
external_customer_id: '<string>',
customer_group_id: 123,
company_name: '<string>',
company_name_addendum: '<string>',
title: '<string>',
date_of_birth: '2023-12-25',
phone_home: '<string>',
phone_home_area_code: '<string>',
phone_mobile: '<string>',
phone_mobile_area_code: '<string>',
phone_business: '<string>',
phone_business_area_code: '<string>',
email_private: '<string>',
email_business: '<string>',
reference_field_1: '<string>',
reference_field_2: '<string>',
billing_company: '<string>',
billing_title: '<string>',
billing_country_id: 123,
billing_fax: '<string>',
vehicle_manufacturer: '<string>',
vehicle_model: '<string>',
vehicle_license_plate: '<string>',
vehicle_country_of_registration_id: 123,
auth_username: '<string>',
auth_password: '<string>',
advertising_agreement_mail: false,
advertising_agreement_phone: false,
advertising_agreement_email: false,
accept_current_agb: false,
accept_current_privacy_policy: false,
vat_identification_number: '<string>',
tax_code: '<string>',
simulation: false,
start_date: '2023-12-25',
attributes: '<string>'
})
};
fetch('https://api.chargecloud.dev/api/v1/crm/contracts', 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.chargecloud.dev/api/v1/crm/contracts",
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([
'business' => false,
'salutation' => 123,
'firstname' => '<string>',
'surname' => '<string>',
'street' => '<string>',
'house_number' => '<string>',
'zip' => '<string>',
'city' => '<string>',
'country_id' => 123,
'billing_salutation' => 123,
'billing_firstname' => '<string>',
'billing_surname' => '<string>',
'billing_street' => '<string>',
'billing_house_number' => '<string>',
'billing_zip' => '<string>',
'billing_city' => '<string>',
'billing_email' => '<string>',
'billing_phone' => '<string>',
'ext_contract_id' => '<string>',
'external_customer_id' => '<string>',
'customer_group_id' => 123,
'company_name' => '<string>',
'company_name_addendum' => '<string>',
'title' => '<string>',
'date_of_birth' => '2023-12-25',
'phone_home' => '<string>',
'phone_home_area_code' => '<string>',
'phone_mobile' => '<string>',
'phone_mobile_area_code' => '<string>',
'phone_business' => '<string>',
'phone_business_area_code' => '<string>',
'email_private' => '<string>',
'email_business' => '<string>',
'reference_field_1' => '<string>',
'reference_field_2' => '<string>',
'billing_company' => '<string>',
'billing_title' => '<string>',
'billing_country_id' => 123,
'billing_fax' => '<string>',
'vehicle_manufacturer' => '<string>',
'vehicle_model' => '<string>',
'vehicle_license_plate' => '<string>',
'vehicle_country_of_registration_id' => 123,
'auth_username' => '<string>',
'auth_password' => '<string>',
'advertising_agreement_mail' => false,
'advertising_agreement_phone' => false,
'advertising_agreement_email' => false,
'accept_current_agb' => false,
'accept_current_privacy_policy' => false,
'vat_identification_number' => '<string>',
'tax_code' => '<string>',
'simulation' => false,
'start_date' => '2023-12-25',
'attributes' => '<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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.chargecloud.dev/api/v1/crm/contracts"
payload := strings.NewReader("{\n \"business\": false,\n \"salutation\": 123,\n \"firstname\": \"<string>\",\n \"surname\": \"<string>\",\n \"street\": \"<string>\",\n \"house_number\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country_id\": 123,\n \"billing_salutation\": 123,\n \"billing_firstname\": \"<string>\",\n \"billing_surname\": \"<string>\",\n \"billing_street\": \"<string>\",\n \"billing_house_number\": \"<string>\",\n \"billing_zip\": \"<string>\",\n \"billing_city\": \"<string>\",\n \"billing_email\": \"<string>\",\n \"billing_phone\": \"<string>\",\n \"ext_contract_id\": \"<string>\",\n \"external_customer_id\": \"<string>\",\n \"customer_group_id\": 123,\n \"company_name\": \"<string>\",\n \"company_name_addendum\": \"<string>\",\n \"title\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_home\": \"<string>\",\n \"phone_home_area_code\": \"<string>\",\n \"phone_mobile\": \"<string>\",\n \"phone_mobile_area_code\": \"<string>\",\n \"phone_business\": \"<string>\",\n \"phone_business_area_code\": \"<string>\",\n \"email_private\": \"<string>\",\n \"email_business\": \"<string>\",\n \"reference_field_1\": \"<string>\",\n \"reference_field_2\": \"<string>\",\n \"billing_company\": \"<string>\",\n \"billing_title\": \"<string>\",\n \"billing_country_id\": 123,\n \"billing_fax\": \"<string>\",\n \"vehicle_manufacturer\": \"<string>\",\n \"vehicle_model\": \"<string>\",\n \"vehicle_license_plate\": \"<string>\",\n \"vehicle_country_of_registration_id\": 123,\n \"auth_username\": \"<string>\",\n \"auth_password\": \"<string>\",\n \"advertising_agreement_mail\": false,\n \"advertising_agreement_phone\": false,\n \"advertising_agreement_email\": false,\n \"accept_current_agb\": false,\n \"accept_current_privacy_policy\": false,\n \"vat_identification_number\": \"<string>\",\n \"tax_code\": \"<string>\",\n \"simulation\": false,\n \"start_date\": \"2023-12-25\",\n \"attributes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.chargecloud.dev/api/v1/crm/contracts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"business\": false,\n \"salutation\": 123,\n \"firstname\": \"<string>\",\n \"surname\": \"<string>\",\n \"street\": \"<string>\",\n \"house_number\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country_id\": 123,\n \"billing_salutation\": 123,\n \"billing_firstname\": \"<string>\",\n \"billing_surname\": \"<string>\",\n \"billing_street\": \"<string>\",\n \"billing_house_number\": \"<string>\",\n \"billing_zip\": \"<string>\",\n \"billing_city\": \"<string>\",\n \"billing_email\": \"<string>\",\n \"billing_phone\": \"<string>\",\n \"ext_contract_id\": \"<string>\",\n \"external_customer_id\": \"<string>\",\n \"customer_group_id\": 123,\n \"company_name\": \"<string>\",\n \"company_name_addendum\": \"<string>\",\n \"title\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_home\": \"<string>\",\n \"phone_home_area_code\": \"<string>\",\n \"phone_mobile\": \"<string>\",\n \"phone_mobile_area_code\": \"<string>\",\n \"phone_business\": \"<string>\",\n \"phone_business_area_code\": \"<string>\",\n \"email_private\": \"<string>\",\n \"email_business\": \"<string>\",\n \"reference_field_1\": \"<string>\",\n \"reference_field_2\": \"<string>\",\n \"billing_company\": \"<string>\",\n \"billing_title\": \"<string>\",\n \"billing_country_id\": 123,\n \"billing_fax\": \"<string>\",\n \"vehicle_manufacturer\": \"<string>\",\n \"vehicle_model\": \"<string>\",\n \"vehicle_license_plate\": \"<string>\",\n \"vehicle_country_of_registration_id\": 123,\n \"auth_username\": \"<string>\",\n \"auth_password\": \"<string>\",\n \"advertising_agreement_mail\": false,\n \"advertising_agreement_phone\": false,\n \"advertising_agreement_email\": false,\n \"accept_current_agb\": false,\n \"accept_current_privacy_policy\": false,\n \"vat_identification_number\": \"<string>\",\n \"tax_code\": \"<string>\",\n \"simulation\": false,\n \"start_date\": \"2023-12-25\",\n \"attributes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chargecloud.dev/api/v1/crm/contracts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"business\": false,\n \"salutation\": 123,\n \"firstname\": \"<string>\",\n \"surname\": \"<string>\",\n \"street\": \"<string>\",\n \"house_number\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country_id\": 123,\n \"billing_salutation\": 123,\n \"billing_firstname\": \"<string>\",\n \"billing_surname\": \"<string>\",\n \"billing_street\": \"<string>\",\n \"billing_house_number\": \"<string>\",\n \"billing_zip\": \"<string>\",\n \"billing_city\": \"<string>\",\n \"billing_email\": \"<string>\",\n \"billing_phone\": \"<string>\",\n \"ext_contract_id\": \"<string>\",\n \"external_customer_id\": \"<string>\",\n \"customer_group_id\": 123,\n \"company_name\": \"<string>\",\n \"company_name_addendum\": \"<string>\",\n \"title\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_home\": \"<string>\",\n \"phone_home_area_code\": \"<string>\",\n \"phone_mobile\": \"<string>\",\n \"phone_mobile_area_code\": \"<string>\",\n \"phone_business\": \"<string>\",\n \"phone_business_area_code\": \"<string>\",\n \"email_private\": \"<string>\",\n \"email_business\": \"<string>\",\n \"reference_field_1\": \"<string>\",\n \"reference_field_2\": \"<string>\",\n \"billing_company\": \"<string>\",\n \"billing_title\": \"<string>\",\n \"billing_country_id\": 123,\n \"billing_fax\": \"<string>\",\n \"vehicle_manufacturer\": \"<string>\",\n \"vehicle_model\": \"<string>\",\n \"vehicle_license_plate\": \"<string>\",\n \"vehicle_country_of_registration_id\": 123,\n \"auth_username\": \"<string>\",\n \"auth_password\": \"<string>\",\n \"advertising_agreement_mail\": false,\n \"advertising_agreement_phone\": false,\n \"advertising_agreement_email\": false,\n \"accept_current_agb\": false,\n \"accept_current_privacy_policy\": false,\n \"vat_identification_number\": \"<string>\",\n \"tax_code\": \"<string>\",\n \"simulation\": false,\n \"start_date\": \"2023-12-25\",\n \"attributes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"contract": {
"uuid": "<string>",
"is_locked": false,
"billing_blocked": false,
"dunning_locked": false,
"billable": false,
"account_id": 123,
"campaign_id": 123,
"business": false,
"salutation": 123,
"firstname": "<string>",
"surname": "<string>",
"street": "<string>",
"house_number": "<string>",
"zip": "<string>",
"city": "<string>",
"phone": "<string>",
"fax": "<string>",
"email": "<string>",
"billing_salutation": 123,
"billing_firstname": "<string>",
"billing_surname": "<string>",
"billing_street": "<string>",
"billing_house_number": "<string>",
"billing_zip": "<string>",
"billing_city": "<string>",
"billing_email": "<string>",
"billing_phone": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"ordered_at": "2023-11-07T05:31:56Z",
"modification_date": "2023-11-07T05:31:56Z",
"ext_contract_id": "<string>",
"external_id": "<string>",
"customer_group_id": 123,
"company_name": "<string>",
"country_id": 123,
"reference_field_1": "<string>",
"reference_field_2": "<string>",
"billing_company": "<string>",
"billing_title": "<string>",
"billing_country_id": 123,
"billing_fax": "<string>",
"title": "<string>",
"tax_code": "<string>",
"external_customer_id": "<string>",
"auth_enabled": false,
"auth_username": "<string>",
"phone_home": "<string>",
"phone_home_area_code": "<string>",
"phone_mobile": "<string>",
"phone_mobile_area_code": "<string>",
"phone_business": "<string>",
"phone_business_area_code": "<string>",
"email_private": "<string>",
"email_business": "<string>",
"vehicle_manufacturer": "<string>",
"vehicle_model": "<string>",
"vehicle_license_plate": "<string>",
"vehicle_country_of_registration_id": 123,
"advertising_agreement_mail": false,
"advertising_agreement_phone": false,
"advertising_agreement_email": false,
"accept_current_agb": false,
"accept_current_privacy_policy": false
},
"customer_id": 123,
"external_customer_id": "<string>",
"mail_verification_needed": false,
"contract_confirmation_needed": false
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"errors": [
{
"errorKey": "<string>",
"message": "<string>",
"parameter": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
OAuth2 Bearer Authorization
Body
Creates a contract. Required permission: crm:contract:create
Is business customer
Salutation
Firstname
70Surname
70Street
255House number
16ZIP
16City
128Country id
Billing salutation
Billing firstname
70Billing surname
70Billing street
255Billing house number
16Billing ZIP
16Billing city
128Billing email
128Billing phone
128External contract id
50External customer ID
15Customer group id
Company name
255Company name addendum
255Title
50Date of birth
^\d{4}-\d{2}-\d{2}$Home phone number
50Home phone area code
10Mobile phone number
50Mobile phone area code
10Business phone number
50Business phone area code
10Private email
255Business email
255Reference field 1
255Reference field 2
255Billing company
255Billing title
70Billing country id
Billing fax
128Vehicle manufacturer
100Vehicle model
100Vehicle license plate
50Vehicle country of registration
App login username
255Auth password
128Advertising agreement mail
Advertising agreement phone
Advertising agreement email
Accept current AGB
Accept current privacy policy
VAT identification number
50Tax code
50Simulation mode
Start date
^\d{4}-\d{2}-\d{2}$JSON-encoded key-value pairs of attribute identifiers and values
Response
Contract created
Was this page helpful?