curl --request POST \
--url https://api.example.com/v2/customers \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Acme",
"external_id": "crm_acme_001",
"stripe_customer_id": "cus_NffrFeUfNV2Hib",
"quickbooks_customer_id": "018f5f0c-1111-7abc-8def-123456789abc"
}
'import requests
url = "https://api.example.com/v2/customers"
payload = {
"name": "Acme",
"external_id": "crm_acme_001",
"stripe_customer_id": "cus_NffrFeUfNV2Hib",
"quickbooks_customer_id": "018f5f0c-1111-7abc-8def-123456789abc"
}
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({
name: 'Acme',
external_id: 'crm_acme_001',
stripe_customer_id: 'cus_NffrFeUfNV2Hib',
quickbooks_customer_id: '018f5f0c-1111-7abc-8def-123456789abc'
})
};
fetch('https://api.example.com/v2/customers', 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.example.com/v2/customers",
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' => 'Acme',
'external_id' => 'crm_acme_001',
'stripe_customer_id' => 'cus_NffrFeUfNV2Hib',
'quickbooks_customer_id' => '018f5f0c-1111-7abc-8def-123456789abc'
]),
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.example.com/v2/customers"
payload := strings.NewReader("{\n \"name\": \"Acme\",\n \"external_id\": \"crm_acme_001\",\n \"stripe_customer_id\": \"cus_NffrFeUfNV2Hib\",\n \"quickbooks_customer_id\": \"018f5f0c-1111-7abc-8def-123456789abc\"\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.example.com/v2/customers")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme\",\n \"external_id\": \"crm_acme_001\",\n \"stripe_customer_id\": \"cus_NffrFeUfNV2Hib\",\n \"quickbooks_customer_id\": \"018f5f0c-1111-7abc-8def-123456789abc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/customers")
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 \"name\": \"Acme\",\n \"external_id\": \"crm_acme_001\",\n \"stripe_customer_id\": \"cus_NffrFeUfNV2Hib\",\n \"quickbooks_customer_id\": \"018f5f0c-1111-7abc-8def-123456789abc\"\n}"
response = http.request(request)
puts response.read_body{
"id": "018f5f0c-1111-7abc-8def-123456789abc",
"name": "Acme",
"external_id": "crm_acme_001",
"stripe_customer_id": "cus_NffrFeUfNV2Hib",
"quickbooks_customer_id": "018f5f0c-1111-7abc-8def-123456789abc",
"created_at": 1767225600,
"updated_at": 1767225600
}"<string>""Invalid API key""<string>""<string>""<string>""<string>""<string>""<string>""rate limit exceeded""<string>"Create a customer.
curl --request POST \
--url https://api.example.com/v2/customers \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Acme",
"external_id": "crm_acme_001",
"stripe_customer_id": "cus_NffrFeUfNV2Hib",
"quickbooks_customer_id": "018f5f0c-1111-7abc-8def-123456789abc"
}
'import requests
url = "https://api.example.com/v2/customers"
payload = {
"name": "Acme",
"external_id": "crm_acme_001",
"stripe_customer_id": "cus_NffrFeUfNV2Hib",
"quickbooks_customer_id": "018f5f0c-1111-7abc-8def-123456789abc"
}
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({
name: 'Acme',
external_id: 'crm_acme_001',
stripe_customer_id: 'cus_NffrFeUfNV2Hib',
quickbooks_customer_id: '018f5f0c-1111-7abc-8def-123456789abc'
})
};
fetch('https://api.example.com/v2/customers', 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.example.com/v2/customers",
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' => 'Acme',
'external_id' => 'crm_acme_001',
'stripe_customer_id' => 'cus_NffrFeUfNV2Hib',
'quickbooks_customer_id' => '018f5f0c-1111-7abc-8def-123456789abc'
]),
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.example.com/v2/customers"
payload := strings.NewReader("{\n \"name\": \"Acme\",\n \"external_id\": \"crm_acme_001\",\n \"stripe_customer_id\": \"cus_NffrFeUfNV2Hib\",\n \"quickbooks_customer_id\": \"018f5f0c-1111-7abc-8def-123456789abc\"\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.example.com/v2/customers")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme\",\n \"external_id\": \"crm_acme_001\",\n \"stripe_customer_id\": \"cus_NffrFeUfNV2Hib\",\n \"quickbooks_customer_id\": \"018f5f0c-1111-7abc-8def-123456789abc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/customers")
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 \"name\": \"Acme\",\n \"external_id\": \"crm_acme_001\",\n \"stripe_customer_id\": \"cus_NffrFeUfNV2Hib\",\n \"quickbooks_customer_id\": \"018f5f0c-1111-7abc-8def-123456789abc\"\n}"
response = http.request(request)
puts response.read_body{
"id": "018f5f0c-1111-7abc-8def-123456789abc",
"name": "Acme",
"external_id": "crm_acme_001",
"stripe_customer_id": "cus_NffrFeUfNV2Hib",
"quickbooks_customer_id": "018f5f0c-1111-7abc-8def-123456789abc",
"created_at": 1767225600,
"updated_at": 1767225600
}"<string>""Invalid API key""<string>""<string>""<string>""<string>""<string>""<string>""rate limit exceeded""<string>"Authorizations
LedgerUp API Key.
Headers
Optional. Duplicate keys within the same company namespace and route return 409. Non-empty idempotency key for deduplicating write requests on the same route.
"6f31c20e-725c-4be8-96f4-835042f67602"
Body
Create-customer request. Unknown JSON fields are rejected.
Customer name. Maximum 256 Unicode scalar values.
256"Acme"
Optional caller-supplied external identifier. Maximum 256 Unicode scalar values.
256"crm_acme_001"
Optional Stripe customer identifier. Maximum 256 Unicode scalar values.
256"cus_NffrFeUfNV2Hib"
Optional QuickBooks customer UUID.
"018f5f0c-1111-7abc-8def-123456789abc"
Response
Created.
Customer UUID.
"018f5f0c-1111-7abc-8def-123456789abc"
Customer name.
256"Acme"
Optional caller-supplied external identifier.
256"crm_acme_001"
Optional Stripe customer identifier.
256"cus_NffrFeUfNV2Hib"
Optional QuickBooks customer UUID.
"018f5f0c-1111-7abc-8def-123456789abc"
Unix timestamp in seconds.
1767225600
Unix timestamp in seconds.
1767225600