Create a customer
curl --request POST \
--url https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/customers/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "<string>",
"reference_number": "<string>",
"individual_name": "<string>",
"company_name": "<string>",
"email": "jsmith@example.com",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state_county": "<string>",
"postal_code": "<string>",
"country": "<string>",
"vat_number": "<string>",
"tax_exempt": false,
"transaction_tags": [
"<unknown>"
],
"notes": "<string>",
"metadata": "<unknown>",
"payment_terms_days": 123,
"credit_limit_cents": 1,
"document": {
"file": "<string>",
"document_type": "customer_document",
"upload_source": "<string>",
"metadata": "<unknown>",
"tags": "<unknown>"
}
}
'import requests
url = "https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/customers/"
payload = {
"external_id": "<string>",
"reference_number": "<string>",
"individual_name": "<string>",
"company_name": "<string>",
"email": "jsmith@example.com",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state_county": "<string>",
"postal_code": "<string>",
"country": "<string>",
"vat_number": "<string>",
"tax_exempt": False,
"transaction_tags": ["<unknown>"],
"notes": "<string>",
"metadata": "<unknown>",
"payment_terms_days": 123,
"credit_limit_cents": 1,
"document": {
"file": "<string>",
"document_type": "customer_document",
"upload_source": "<string>",
"metadata": "<unknown>",
"tags": "<unknown>"
}
}
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({
external_id: '<string>',
reference_number: '<string>',
individual_name: '<string>',
company_name: '<string>',
email: 'jsmith@example.com',
mobile_phone: '<string>',
office_phone: '<string>',
address_line1: '<string>',
address_line2: '<string>',
city: '<string>',
state_county: '<string>',
postal_code: '<string>',
country: '<string>',
vat_number: '<string>',
tax_exempt: false,
transaction_tags: ['<unknown>'],
notes: '<string>',
metadata: '<unknown>',
payment_terms_days: 123,
credit_limit_cents: 1,
document: {
file: '<string>',
document_type: 'customer_document',
upload_source: '<string>',
metadata: '<unknown>',
tags: '<unknown>'
}
})
};
fetch('https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/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([
'external_id' => '<string>',
'reference_number' => '<string>',
'individual_name' => '<string>',
'company_name' => '<string>',
'email' => 'jsmith@example.com',
'mobile_phone' => '<string>',
'office_phone' => '<string>',
'address_line1' => '<string>',
'address_line2' => '<string>',
'city' => '<string>',
'state_county' => '<string>',
'postal_code' => '<string>',
'country' => '<string>',
'vat_number' => '<string>',
'tax_exempt' => false,
'transaction_tags' => [
'<unknown>'
],
'notes' => '<string>',
'metadata' => '<unknown>',
'payment_terms_days' => 123,
'credit_limit_cents' => 1,
'document' => [
'file' => '<string>',
'document_type' => 'customer_document',
'upload_source' => '<string>',
'metadata' => '<unknown>',
'tags' => '<unknown>'
]
]),
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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/customers/"
payload := strings.NewReader("{\n \"external_id\": \"<string>\",\n \"reference_number\": \"<string>\",\n \"individual_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"mobile_phone\": \"<string>\",\n \"office_phone\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state_county\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"tax_exempt\": false,\n \"transaction_tags\": [\n \"<unknown>\"\n ],\n \"notes\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"payment_terms_days\": 123,\n \"credit_limit_cents\": 1,\n \"document\": {\n \"file\": \"<string>\",\n \"document_type\": \"customer_document\",\n \"upload_source\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"tags\": \"<unknown>\"\n }\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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/customers/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"<string>\",\n \"reference_number\": \"<string>\",\n \"individual_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"mobile_phone\": \"<string>\",\n \"office_phone\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state_county\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"tax_exempt\": false,\n \"transaction_tags\": [\n \"<unknown>\"\n ],\n \"notes\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"payment_terms_days\": 123,\n \"credit_limit_cents\": 1,\n \"document\": {\n \"file\": \"<string>\",\n \"document_type\": \"customer_document\",\n \"upload_source\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"tags\": \"<unknown>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/customers/")
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 \"external_id\": \"<string>\",\n \"reference_number\": \"<string>\",\n \"individual_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"mobile_phone\": \"<string>\",\n \"office_phone\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state_county\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"tax_exempt\": false,\n \"transaction_tags\": [\n \"<unknown>\"\n ],\n \"notes\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"payment_terms_days\": 123,\n \"credit_limit_cents\": 1,\n \"document\": {\n \"file\": \"<string>\",\n \"document_type\": \"customer_document\",\n \"upload_source\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"tags\": \"<unknown>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"reference_number": "<string>",
"individual_name": "<string>",
"company_name": "<string>",
"display_name": "<string>",
"email": "jsmith@example.com",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state_county": "<string>",
"postal_code": "<string>",
"country": "<string>",
"full_address": "<string>",
"address_string": "<string>",
"vat_number": "<string>",
"tax_exempt": true,
"status": "<string>",
"is_active": true,
"is_archived": true,
"transaction_tags": [
"<unknown>"
],
"notes": "<string>",
"metadata": "<unknown>",
"payment_terms_days": 123,
"credit_limit": 123,
"credit_limit_cents": 123,
"outstanding_balance": 123,
"documents": [
{
"url": "<string>",
"expires_in": 123,
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_name": "<string>",
"file_size": 123,
"mime_type": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}Customers
Create a customer
Create a new customer within a business. Returns the created customer in the same format as the get customer endpoint.
POST
/
v1
/
platform
/
businesses
/
{business_id}
/
customers
/
Create a customer
curl --request POST \
--url https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/customers/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "<string>",
"reference_number": "<string>",
"individual_name": "<string>",
"company_name": "<string>",
"email": "jsmith@example.com",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state_county": "<string>",
"postal_code": "<string>",
"country": "<string>",
"vat_number": "<string>",
"tax_exempt": false,
"transaction_tags": [
"<unknown>"
],
"notes": "<string>",
"metadata": "<unknown>",
"payment_terms_days": 123,
"credit_limit_cents": 1,
"document": {
"file": "<string>",
"document_type": "customer_document",
"upload_source": "<string>",
"metadata": "<unknown>",
"tags": "<unknown>"
}
}
'import requests
url = "https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/customers/"
payload = {
"external_id": "<string>",
"reference_number": "<string>",
"individual_name": "<string>",
"company_name": "<string>",
"email": "jsmith@example.com",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state_county": "<string>",
"postal_code": "<string>",
"country": "<string>",
"vat_number": "<string>",
"tax_exempt": False,
"transaction_tags": ["<unknown>"],
"notes": "<string>",
"metadata": "<unknown>",
"payment_terms_days": 123,
"credit_limit_cents": 1,
"document": {
"file": "<string>",
"document_type": "customer_document",
"upload_source": "<string>",
"metadata": "<unknown>",
"tags": "<unknown>"
}
}
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({
external_id: '<string>',
reference_number: '<string>',
individual_name: '<string>',
company_name: '<string>',
email: 'jsmith@example.com',
mobile_phone: '<string>',
office_phone: '<string>',
address_line1: '<string>',
address_line2: '<string>',
city: '<string>',
state_county: '<string>',
postal_code: '<string>',
country: '<string>',
vat_number: '<string>',
tax_exempt: false,
transaction_tags: ['<unknown>'],
notes: '<string>',
metadata: '<unknown>',
payment_terms_days: 123,
credit_limit_cents: 1,
document: {
file: '<string>',
document_type: 'customer_document',
upload_source: '<string>',
metadata: '<unknown>',
tags: '<unknown>'
}
})
};
fetch('https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/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([
'external_id' => '<string>',
'reference_number' => '<string>',
'individual_name' => '<string>',
'company_name' => '<string>',
'email' => 'jsmith@example.com',
'mobile_phone' => '<string>',
'office_phone' => '<string>',
'address_line1' => '<string>',
'address_line2' => '<string>',
'city' => '<string>',
'state_county' => '<string>',
'postal_code' => '<string>',
'country' => '<string>',
'vat_number' => '<string>',
'tax_exempt' => false,
'transaction_tags' => [
'<unknown>'
],
'notes' => '<string>',
'metadata' => '<unknown>',
'payment_terms_days' => 123,
'credit_limit_cents' => 1,
'document' => [
'file' => '<string>',
'document_type' => 'customer_document',
'upload_source' => '<string>',
'metadata' => '<unknown>',
'tags' => '<unknown>'
]
]),
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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/customers/"
payload := strings.NewReader("{\n \"external_id\": \"<string>\",\n \"reference_number\": \"<string>\",\n \"individual_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"mobile_phone\": \"<string>\",\n \"office_phone\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state_county\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"tax_exempt\": false,\n \"transaction_tags\": [\n \"<unknown>\"\n ],\n \"notes\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"payment_terms_days\": 123,\n \"credit_limit_cents\": 1,\n \"document\": {\n \"file\": \"<string>\",\n \"document_type\": \"customer_document\",\n \"upload_source\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"tags\": \"<unknown>\"\n }\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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/customers/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"<string>\",\n \"reference_number\": \"<string>\",\n \"individual_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"mobile_phone\": \"<string>\",\n \"office_phone\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state_county\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"tax_exempt\": false,\n \"transaction_tags\": [\n \"<unknown>\"\n ],\n \"notes\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"payment_terms_days\": 123,\n \"credit_limit_cents\": 1,\n \"document\": {\n \"file\": \"<string>\",\n \"document_type\": \"customer_document\",\n \"upload_source\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"tags\": \"<unknown>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/customers/")
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 \"external_id\": \"<string>\",\n \"reference_number\": \"<string>\",\n \"individual_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"mobile_phone\": \"<string>\",\n \"office_phone\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state_county\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"tax_exempt\": false,\n \"transaction_tags\": [\n \"<unknown>\"\n ],\n \"notes\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"payment_terms_days\": 123,\n \"credit_limit_cents\": 1,\n \"document\": {\n \"file\": \"<string>\",\n \"document_type\": \"customer_document\",\n \"upload_source\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"tags\": \"<unknown>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"reference_number": "<string>",
"individual_name": "<string>",
"company_name": "<string>",
"display_name": "<string>",
"email": "jsmith@example.com",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state_county": "<string>",
"postal_code": "<string>",
"country": "<string>",
"full_address": "<string>",
"address_string": "<string>",
"vat_number": "<string>",
"tax_exempt": true,
"status": "<string>",
"is_active": true,
"is_archived": true,
"transaction_tags": [
"<unknown>"
],
"notes": "<string>",
"metadata": "<unknown>",
"payment_terms_days": 123,
"credit_limit": 123,
"credit_limit_cents": 123,
"outstanding_balance": 123,
"documents": [
{
"url": "<string>",
"expires_in": 123,
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_name": "<string>",
"file_size": 123,
"mime_type": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}Authorizations
PartnerJWTBusinessScopedJWTBasicAuthBearerUnscopedBearerBusinessScoped
Partner-level JWT token (unscoped). Token payload includes partner_id. Business access is validated via partner ownership. Format: Bearer <your-jwt-token>
Use this for: Multi-business operations where the business_id is specified in the URL and partner has access to multiple businesses.
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Serializer for creating new customers
Response
Main customer serializer for customer API endpoints Returns customer information with comprehensive details Used for both list and detail responses
Was this page helpful?