curl --request POST \
--url https://api.upwell.com/api/rest/customers \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"addresses": {
"data": [
{
"canonicalAddressId": "<string>",
"city": "<string>",
"companyId": "<string>",
"companyName": "<string>",
"customerId": "<string>",
"locationCodeId": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"stateOrProvince": "<string>",
"streetLine1": "<string>",
"streetLine2": "<string>",
"streetLine3": "<string>",
"zipOrPostalCode": "<string>"
}
]
},
"billToCustomerId": "<string>",
"ccEmailAddresses": [
"<string>"
],
"contacts": {
"data": [
{
"customerId": "<string>",
"email": "<unknown>",
"phoneNumber": "<unknown>"
}
]
},
"customerRule": {
"data": {
"autoSend": true,
"automationGoLiveDate": "2023-12-25",
"customFilenameConfig": "<unknown>",
"dueOption": 123,
"invoiceCreationEnabled": true,
"invoiceCreationMode": "<string>",
"invoiceOrganizationTemplateId": "<string>",
"listBillColumnTemplateId": "<string>",
"organizationEmailTemplatesId": "<string>",
"postDeliveryInvoiceBufferDays": 123,
"statementOrganizationEmailTemplatesId": "<string>"
}
},
"emailAddress": "<string>",
"isActive": true,
"metadata": "<unknown>",
"name": "<string>",
"payorAliases": "<unknown>",
"sourceSystem": "<string>",
"sourceSystemId": "<string>",
"tmsCustomerType": "<string>",
"upwellDeliveryEnabled": true
}
}
'import requests
url = "https://api.upwell.com/api/rest/customers"
payload = { "input": {
"addresses": { "data": [
{
"canonicalAddressId": "<string>",
"city": "<string>",
"companyId": "<string>",
"companyName": "<string>",
"customerId": "<string>",
"locationCodeId": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"stateOrProvince": "<string>",
"streetLine1": "<string>",
"streetLine2": "<string>",
"streetLine3": "<string>",
"zipOrPostalCode": "<string>"
}
] },
"billToCustomerId": "<string>",
"ccEmailAddresses": ["<string>"],
"contacts": { "data": [
{
"customerId": "<string>",
"email": "<unknown>",
"phoneNumber": "<unknown>"
}
] },
"customerRule": { "data": {
"autoSend": True,
"automationGoLiveDate": "2023-12-25",
"customFilenameConfig": "<unknown>",
"dueOption": 123,
"invoiceCreationEnabled": True,
"invoiceCreationMode": "<string>",
"invoiceOrganizationTemplateId": "<string>",
"listBillColumnTemplateId": "<string>",
"organizationEmailTemplatesId": "<string>",
"postDeliveryInvoiceBufferDays": 123,
"statementOrganizationEmailTemplatesId": "<string>"
} },
"emailAddress": "<string>",
"isActive": True,
"metadata": "<unknown>",
"name": "<string>",
"payorAliases": "<unknown>",
"sourceSystem": "<string>",
"sourceSystemId": "<string>",
"tmsCustomerType": "<string>",
"upwellDeliveryEnabled": True
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: {
addresses: {
data: [
{
canonicalAddressId: '<string>',
city: '<string>',
companyId: '<string>',
companyName: '<string>',
customerId: '<string>',
locationCodeId: '<string>',
name: '<string>',
phoneNumber: '<string>',
stateOrProvince: '<string>',
streetLine1: '<string>',
streetLine2: '<string>',
streetLine3: '<string>',
zipOrPostalCode: '<string>'
}
]
},
billToCustomerId: '<string>',
ccEmailAddresses: ['<string>'],
contacts: {data: [{customerId: '<string>', email: '<unknown>', phoneNumber: '<unknown>'}]},
customerRule: {
data: {
autoSend: true,
automationGoLiveDate: '2023-12-25',
customFilenameConfig: '<unknown>',
dueOption: 123,
invoiceCreationEnabled: true,
invoiceCreationMode: '<string>',
invoiceOrganizationTemplateId: '<string>',
listBillColumnTemplateId: '<string>',
organizationEmailTemplatesId: '<string>',
postDeliveryInvoiceBufferDays: 123,
statementOrganizationEmailTemplatesId: '<string>'
}
},
emailAddress: '<string>',
isActive: true,
metadata: '<unknown>',
name: '<string>',
payorAliases: '<unknown>',
sourceSystem: '<string>',
sourceSystemId: '<string>',
tmsCustomerType: '<string>',
upwellDeliveryEnabled: true
}
})
};
fetch('https://api.upwell.com/api/rest/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.upwell.com/api/rest/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([
'input' => [
'addresses' => [
'data' => [
[
'canonicalAddressId' => '<string>',
'city' => '<string>',
'companyId' => '<string>',
'companyName' => '<string>',
'customerId' => '<string>',
'locationCodeId' => '<string>',
'name' => '<string>',
'phoneNumber' => '<string>',
'stateOrProvince' => '<string>',
'streetLine1' => '<string>',
'streetLine2' => '<string>',
'streetLine3' => '<string>',
'zipOrPostalCode' => '<string>'
]
]
],
'billToCustomerId' => '<string>',
'ccEmailAddresses' => [
'<string>'
],
'contacts' => [
'data' => [
[
'customerId' => '<string>',
'email' => '<unknown>',
'phoneNumber' => '<unknown>'
]
]
],
'customerRule' => [
'data' => [
'autoSend' => true,
'automationGoLiveDate' => '2023-12-25',
'customFilenameConfig' => '<unknown>',
'dueOption' => 123,
'invoiceCreationEnabled' => true,
'invoiceCreationMode' => '<string>',
'invoiceOrganizationTemplateId' => '<string>',
'listBillColumnTemplateId' => '<string>',
'organizationEmailTemplatesId' => '<string>',
'postDeliveryInvoiceBufferDays' => 123,
'statementOrganizationEmailTemplatesId' => '<string>'
]
],
'emailAddress' => '<string>',
'isActive' => true,
'metadata' => '<unknown>',
'name' => '<string>',
'payorAliases' => '<unknown>',
'sourceSystem' => '<string>',
'sourceSystemId' => '<string>',
'tmsCustomerType' => '<string>',
'upwellDeliveryEnabled' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.upwell.com/api/rest/customers"
payload := strings.NewReader("{\n \"input\": {\n \"addresses\": {\n \"data\": [\n {\n \"canonicalAddressId\": \"<string>\",\n \"city\": \"<string>\",\n \"companyId\": \"<string>\",\n \"companyName\": \"<string>\",\n \"customerId\": \"<string>\",\n \"locationCodeId\": \"<string>\",\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"stateOrProvince\": \"<string>\",\n \"streetLine1\": \"<string>\",\n \"streetLine2\": \"<string>\",\n \"streetLine3\": \"<string>\",\n \"zipOrPostalCode\": \"<string>\"\n }\n ]\n },\n \"billToCustomerId\": \"<string>\",\n \"ccEmailAddresses\": [\n \"<string>\"\n ],\n \"contacts\": {\n \"data\": [\n {\n \"customerId\": \"<string>\",\n \"email\": \"<unknown>\",\n \"phoneNumber\": \"<unknown>\"\n }\n ]\n },\n \"customerRule\": {\n \"data\": {\n \"autoSend\": true,\n \"automationGoLiveDate\": \"2023-12-25\",\n \"customFilenameConfig\": \"<unknown>\",\n \"dueOption\": 123,\n \"invoiceCreationEnabled\": true,\n \"invoiceCreationMode\": \"<string>\",\n \"invoiceOrganizationTemplateId\": \"<string>\",\n \"listBillColumnTemplateId\": \"<string>\",\n \"organizationEmailTemplatesId\": \"<string>\",\n \"postDeliveryInvoiceBufferDays\": 123,\n \"statementOrganizationEmailTemplatesId\": \"<string>\"\n }\n },\n \"emailAddress\": \"<string>\",\n \"isActive\": true,\n \"metadata\": \"<unknown>\",\n \"name\": \"<string>\",\n \"payorAliases\": \"<unknown>\",\n \"sourceSystem\": \"<string>\",\n \"sourceSystemId\": \"<string>\",\n \"tmsCustomerType\": \"<string>\",\n \"upwellDeliveryEnabled\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.upwell.com/api/rest/customers")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"addresses\": {\n \"data\": [\n {\n \"canonicalAddressId\": \"<string>\",\n \"city\": \"<string>\",\n \"companyId\": \"<string>\",\n \"companyName\": \"<string>\",\n \"customerId\": \"<string>\",\n \"locationCodeId\": \"<string>\",\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"stateOrProvince\": \"<string>\",\n \"streetLine1\": \"<string>\",\n \"streetLine2\": \"<string>\",\n \"streetLine3\": \"<string>\",\n \"zipOrPostalCode\": \"<string>\"\n }\n ]\n },\n \"billToCustomerId\": \"<string>\",\n \"ccEmailAddresses\": [\n \"<string>\"\n ],\n \"contacts\": {\n \"data\": [\n {\n \"customerId\": \"<string>\",\n \"email\": \"<unknown>\",\n \"phoneNumber\": \"<unknown>\"\n }\n ]\n },\n \"customerRule\": {\n \"data\": {\n \"autoSend\": true,\n \"automationGoLiveDate\": \"2023-12-25\",\n \"customFilenameConfig\": \"<unknown>\",\n \"dueOption\": 123,\n \"invoiceCreationEnabled\": true,\n \"invoiceCreationMode\": \"<string>\",\n \"invoiceOrganizationTemplateId\": \"<string>\",\n \"listBillColumnTemplateId\": \"<string>\",\n \"organizationEmailTemplatesId\": \"<string>\",\n \"postDeliveryInvoiceBufferDays\": 123,\n \"statementOrganizationEmailTemplatesId\": \"<string>\"\n }\n },\n \"emailAddress\": \"<string>\",\n \"isActive\": true,\n \"metadata\": \"<unknown>\",\n \"name\": \"<string>\",\n \"payorAliases\": \"<unknown>\",\n \"sourceSystem\": \"<string>\",\n \"sourceSystemId\": \"<string>\",\n \"tmsCustomerType\": \"<string>\",\n \"upwellDeliveryEnabled\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upwell.com/api/rest/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": {\n \"addresses\": {\n \"data\": [\n {\n \"canonicalAddressId\": \"<string>\",\n \"city\": \"<string>\",\n \"companyId\": \"<string>\",\n \"companyName\": \"<string>\",\n \"customerId\": \"<string>\",\n \"locationCodeId\": \"<string>\",\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"stateOrProvince\": \"<string>\",\n \"streetLine1\": \"<string>\",\n \"streetLine2\": \"<string>\",\n \"streetLine3\": \"<string>\",\n \"zipOrPostalCode\": \"<string>\"\n }\n ]\n },\n \"billToCustomerId\": \"<string>\",\n \"ccEmailAddresses\": [\n \"<string>\"\n ],\n \"contacts\": {\n \"data\": [\n {\n \"customerId\": \"<string>\",\n \"email\": \"<unknown>\",\n \"phoneNumber\": \"<unknown>\"\n }\n ]\n },\n \"customerRule\": {\n \"data\": {\n \"autoSend\": true,\n \"automationGoLiveDate\": \"2023-12-25\",\n \"customFilenameConfig\": \"<unknown>\",\n \"dueOption\": 123,\n \"invoiceCreationEnabled\": true,\n \"invoiceCreationMode\": \"<string>\",\n \"invoiceOrganizationTemplateId\": \"<string>\",\n \"listBillColumnTemplateId\": \"<string>\",\n \"organizationEmailTemplatesId\": \"<string>\",\n \"postDeliveryInvoiceBufferDays\": 123,\n \"statementOrganizationEmailTemplatesId\": \"<string>\"\n }\n },\n \"emailAddress\": \"<string>\",\n \"isActive\": true,\n \"metadata\": \"<unknown>\",\n \"name\": \"<string>\",\n \"payorAliases\": \"<unknown>\",\n \"sourceSystem\": \"<string>\",\n \"sourceSystemId\": \"<string>\",\n \"tmsCustomerType\": \"<string>\",\n \"upwellDeliveryEnabled\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"createCustomer": {
"addresses": [
{
"city": "<string>",
"country": "AD",
"id": "<string>",
"stateOrProvince": "<string>",
"streetLine1": "<string>",
"streetLine2": "<string>",
"type": "ADDRESS_BOOK",
"zipOrPostalCode": "<string>"
}
],
"balance": "<unknown>",
"billToCustomerId": "<string>",
"ccEmailAddresses": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"customerRule": {
"dueOption": 123,
"id": "<string>"
},
"emailAddress": "<string>",
"id": "<string>",
"metadata": "<unknown>",
"name": "<string>",
"overdueBalance": "<unknown>",
"overdueInvoiceCount": 123,
"sourceSystem": "<string>",
"sourceSystemId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "Not-NULL violation. null value in column \"shipment_id\" of relation \"shipments\" violates not-null constraint",
"code": "constraint-violation"
}{
"error": "Authentication hook unauthorized this request",
"path": "$",
"code": "access-denied"
}Create One Customer
Create a new customer.
Integration note: POST errors with 400 Uniqueness violation if a customer with this (sourceSystem, sourceSystemId) pair already exists. Use PUT /api/rest/customers/{id} (or PUT /api/rest/customers/by-source-system-id/{id}) for updates. See Integration patterns.
curl --request POST \
--url https://api.upwell.com/api/rest/customers \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"addresses": {
"data": [
{
"canonicalAddressId": "<string>",
"city": "<string>",
"companyId": "<string>",
"companyName": "<string>",
"customerId": "<string>",
"locationCodeId": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"stateOrProvince": "<string>",
"streetLine1": "<string>",
"streetLine2": "<string>",
"streetLine3": "<string>",
"zipOrPostalCode": "<string>"
}
]
},
"billToCustomerId": "<string>",
"ccEmailAddresses": [
"<string>"
],
"contacts": {
"data": [
{
"customerId": "<string>",
"email": "<unknown>",
"phoneNumber": "<unknown>"
}
]
},
"customerRule": {
"data": {
"autoSend": true,
"automationGoLiveDate": "2023-12-25",
"customFilenameConfig": "<unknown>",
"dueOption": 123,
"invoiceCreationEnabled": true,
"invoiceCreationMode": "<string>",
"invoiceOrganizationTemplateId": "<string>",
"listBillColumnTemplateId": "<string>",
"organizationEmailTemplatesId": "<string>",
"postDeliveryInvoiceBufferDays": 123,
"statementOrganizationEmailTemplatesId": "<string>"
}
},
"emailAddress": "<string>",
"isActive": true,
"metadata": "<unknown>",
"name": "<string>",
"payorAliases": "<unknown>",
"sourceSystem": "<string>",
"sourceSystemId": "<string>",
"tmsCustomerType": "<string>",
"upwellDeliveryEnabled": true
}
}
'import requests
url = "https://api.upwell.com/api/rest/customers"
payload = { "input": {
"addresses": { "data": [
{
"canonicalAddressId": "<string>",
"city": "<string>",
"companyId": "<string>",
"companyName": "<string>",
"customerId": "<string>",
"locationCodeId": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"stateOrProvince": "<string>",
"streetLine1": "<string>",
"streetLine2": "<string>",
"streetLine3": "<string>",
"zipOrPostalCode": "<string>"
}
] },
"billToCustomerId": "<string>",
"ccEmailAddresses": ["<string>"],
"contacts": { "data": [
{
"customerId": "<string>",
"email": "<unknown>",
"phoneNumber": "<unknown>"
}
] },
"customerRule": { "data": {
"autoSend": True,
"automationGoLiveDate": "2023-12-25",
"customFilenameConfig": "<unknown>",
"dueOption": 123,
"invoiceCreationEnabled": True,
"invoiceCreationMode": "<string>",
"invoiceOrganizationTemplateId": "<string>",
"listBillColumnTemplateId": "<string>",
"organizationEmailTemplatesId": "<string>",
"postDeliveryInvoiceBufferDays": 123,
"statementOrganizationEmailTemplatesId": "<string>"
} },
"emailAddress": "<string>",
"isActive": True,
"metadata": "<unknown>",
"name": "<string>",
"payorAliases": "<unknown>",
"sourceSystem": "<string>",
"sourceSystemId": "<string>",
"tmsCustomerType": "<string>",
"upwellDeliveryEnabled": True
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: {
addresses: {
data: [
{
canonicalAddressId: '<string>',
city: '<string>',
companyId: '<string>',
companyName: '<string>',
customerId: '<string>',
locationCodeId: '<string>',
name: '<string>',
phoneNumber: '<string>',
stateOrProvince: '<string>',
streetLine1: '<string>',
streetLine2: '<string>',
streetLine3: '<string>',
zipOrPostalCode: '<string>'
}
]
},
billToCustomerId: '<string>',
ccEmailAddresses: ['<string>'],
contacts: {data: [{customerId: '<string>', email: '<unknown>', phoneNumber: '<unknown>'}]},
customerRule: {
data: {
autoSend: true,
automationGoLiveDate: '2023-12-25',
customFilenameConfig: '<unknown>',
dueOption: 123,
invoiceCreationEnabled: true,
invoiceCreationMode: '<string>',
invoiceOrganizationTemplateId: '<string>',
listBillColumnTemplateId: '<string>',
organizationEmailTemplatesId: '<string>',
postDeliveryInvoiceBufferDays: 123,
statementOrganizationEmailTemplatesId: '<string>'
}
},
emailAddress: '<string>',
isActive: true,
metadata: '<unknown>',
name: '<string>',
payorAliases: '<unknown>',
sourceSystem: '<string>',
sourceSystemId: '<string>',
tmsCustomerType: '<string>',
upwellDeliveryEnabled: true
}
})
};
fetch('https://api.upwell.com/api/rest/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.upwell.com/api/rest/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([
'input' => [
'addresses' => [
'data' => [
[
'canonicalAddressId' => '<string>',
'city' => '<string>',
'companyId' => '<string>',
'companyName' => '<string>',
'customerId' => '<string>',
'locationCodeId' => '<string>',
'name' => '<string>',
'phoneNumber' => '<string>',
'stateOrProvince' => '<string>',
'streetLine1' => '<string>',
'streetLine2' => '<string>',
'streetLine3' => '<string>',
'zipOrPostalCode' => '<string>'
]
]
],
'billToCustomerId' => '<string>',
'ccEmailAddresses' => [
'<string>'
],
'contacts' => [
'data' => [
[
'customerId' => '<string>',
'email' => '<unknown>',
'phoneNumber' => '<unknown>'
]
]
],
'customerRule' => [
'data' => [
'autoSend' => true,
'automationGoLiveDate' => '2023-12-25',
'customFilenameConfig' => '<unknown>',
'dueOption' => 123,
'invoiceCreationEnabled' => true,
'invoiceCreationMode' => '<string>',
'invoiceOrganizationTemplateId' => '<string>',
'listBillColumnTemplateId' => '<string>',
'organizationEmailTemplatesId' => '<string>',
'postDeliveryInvoiceBufferDays' => 123,
'statementOrganizationEmailTemplatesId' => '<string>'
]
],
'emailAddress' => '<string>',
'isActive' => true,
'metadata' => '<unknown>',
'name' => '<string>',
'payorAliases' => '<unknown>',
'sourceSystem' => '<string>',
'sourceSystemId' => '<string>',
'tmsCustomerType' => '<string>',
'upwellDeliveryEnabled' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.upwell.com/api/rest/customers"
payload := strings.NewReader("{\n \"input\": {\n \"addresses\": {\n \"data\": [\n {\n \"canonicalAddressId\": \"<string>\",\n \"city\": \"<string>\",\n \"companyId\": \"<string>\",\n \"companyName\": \"<string>\",\n \"customerId\": \"<string>\",\n \"locationCodeId\": \"<string>\",\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"stateOrProvince\": \"<string>\",\n \"streetLine1\": \"<string>\",\n \"streetLine2\": \"<string>\",\n \"streetLine3\": \"<string>\",\n \"zipOrPostalCode\": \"<string>\"\n }\n ]\n },\n \"billToCustomerId\": \"<string>\",\n \"ccEmailAddresses\": [\n \"<string>\"\n ],\n \"contacts\": {\n \"data\": [\n {\n \"customerId\": \"<string>\",\n \"email\": \"<unknown>\",\n \"phoneNumber\": \"<unknown>\"\n }\n ]\n },\n \"customerRule\": {\n \"data\": {\n \"autoSend\": true,\n \"automationGoLiveDate\": \"2023-12-25\",\n \"customFilenameConfig\": \"<unknown>\",\n \"dueOption\": 123,\n \"invoiceCreationEnabled\": true,\n \"invoiceCreationMode\": \"<string>\",\n \"invoiceOrganizationTemplateId\": \"<string>\",\n \"listBillColumnTemplateId\": \"<string>\",\n \"organizationEmailTemplatesId\": \"<string>\",\n \"postDeliveryInvoiceBufferDays\": 123,\n \"statementOrganizationEmailTemplatesId\": \"<string>\"\n }\n },\n \"emailAddress\": \"<string>\",\n \"isActive\": true,\n \"metadata\": \"<unknown>\",\n \"name\": \"<string>\",\n \"payorAliases\": \"<unknown>\",\n \"sourceSystem\": \"<string>\",\n \"sourceSystemId\": \"<string>\",\n \"tmsCustomerType\": \"<string>\",\n \"upwellDeliveryEnabled\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.upwell.com/api/rest/customers")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"addresses\": {\n \"data\": [\n {\n \"canonicalAddressId\": \"<string>\",\n \"city\": \"<string>\",\n \"companyId\": \"<string>\",\n \"companyName\": \"<string>\",\n \"customerId\": \"<string>\",\n \"locationCodeId\": \"<string>\",\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"stateOrProvince\": \"<string>\",\n \"streetLine1\": \"<string>\",\n \"streetLine2\": \"<string>\",\n \"streetLine3\": \"<string>\",\n \"zipOrPostalCode\": \"<string>\"\n }\n ]\n },\n \"billToCustomerId\": \"<string>\",\n \"ccEmailAddresses\": [\n \"<string>\"\n ],\n \"contacts\": {\n \"data\": [\n {\n \"customerId\": \"<string>\",\n \"email\": \"<unknown>\",\n \"phoneNumber\": \"<unknown>\"\n }\n ]\n },\n \"customerRule\": {\n \"data\": {\n \"autoSend\": true,\n \"automationGoLiveDate\": \"2023-12-25\",\n \"customFilenameConfig\": \"<unknown>\",\n \"dueOption\": 123,\n \"invoiceCreationEnabled\": true,\n \"invoiceCreationMode\": \"<string>\",\n \"invoiceOrganizationTemplateId\": \"<string>\",\n \"listBillColumnTemplateId\": \"<string>\",\n \"organizationEmailTemplatesId\": \"<string>\",\n \"postDeliveryInvoiceBufferDays\": 123,\n \"statementOrganizationEmailTemplatesId\": \"<string>\"\n }\n },\n \"emailAddress\": \"<string>\",\n \"isActive\": true,\n \"metadata\": \"<unknown>\",\n \"name\": \"<string>\",\n \"payorAliases\": \"<unknown>\",\n \"sourceSystem\": \"<string>\",\n \"sourceSystemId\": \"<string>\",\n \"tmsCustomerType\": \"<string>\",\n \"upwellDeliveryEnabled\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upwell.com/api/rest/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": {\n \"addresses\": {\n \"data\": [\n {\n \"canonicalAddressId\": \"<string>\",\n \"city\": \"<string>\",\n \"companyId\": \"<string>\",\n \"companyName\": \"<string>\",\n \"customerId\": \"<string>\",\n \"locationCodeId\": \"<string>\",\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"stateOrProvince\": \"<string>\",\n \"streetLine1\": \"<string>\",\n \"streetLine2\": \"<string>\",\n \"streetLine3\": \"<string>\",\n \"zipOrPostalCode\": \"<string>\"\n }\n ]\n },\n \"billToCustomerId\": \"<string>\",\n \"ccEmailAddresses\": [\n \"<string>\"\n ],\n \"contacts\": {\n \"data\": [\n {\n \"customerId\": \"<string>\",\n \"email\": \"<unknown>\",\n \"phoneNumber\": \"<unknown>\"\n }\n ]\n },\n \"customerRule\": {\n \"data\": {\n \"autoSend\": true,\n \"automationGoLiveDate\": \"2023-12-25\",\n \"customFilenameConfig\": \"<unknown>\",\n \"dueOption\": 123,\n \"invoiceCreationEnabled\": true,\n \"invoiceCreationMode\": \"<string>\",\n \"invoiceOrganizationTemplateId\": \"<string>\",\n \"listBillColumnTemplateId\": \"<string>\",\n \"organizationEmailTemplatesId\": \"<string>\",\n \"postDeliveryInvoiceBufferDays\": 123,\n \"statementOrganizationEmailTemplatesId\": \"<string>\"\n }\n },\n \"emailAddress\": \"<string>\",\n \"isActive\": true,\n \"metadata\": \"<unknown>\",\n \"name\": \"<string>\",\n \"payorAliases\": \"<unknown>\",\n \"sourceSystem\": \"<string>\",\n \"sourceSystemId\": \"<string>\",\n \"tmsCustomerType\": \"<string>\",\n \"upwellDeliveryEnabled\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"createCustomer": {
"addresses": [
{
"city": "<string>",
"country": "AD",
"id": "<string>",
"stateOrProvince": "<string>",
"streetLine1": "<string>",
"streetLine2": "<string>",
"type": "ADDRESS_BOOK",
"zipOrPostalCode": "<string>"
}
],
"balance": "<unknown>",
"billToCustomerId": "<string>",
"ccEmailAddresses": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"customerRule": {
"dueOption": 123,
"id": "<string>"
},
"emailAddress": "<string>",
"id": "<string>",
"metadata": "<unknown>",
"name": "<string>",
"overdueBalance": "<unknown>",
"overdueInvoiceCount": 123,
"sourceSystem": "<string>",
"sourceSystemId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "Not-NULL violation. null value in column \"shipment_id\" of relation \"shipments\" violates not-null constraint",
"code": "constraint-violation"
}{
"error": "Authentication hook unauthorized this request",
"path": "$",
"code": "access-denied"
}POSTing an existing (sourceSystem, sourceSystemId) pair returns 400 Uniqueness violation — create once, then update with PUT. See Idempotency & retries.Authorizations
Your API key, sent in the Authorization header: Authorization: YOUR_API_KEY. A Bearer prefix is also accepted (Authorization: Bearer YOUR_API_KEY). Keys are created in the Upwell dashboard (Account → API keys) and are scoped to one organization.
Body
Query parameters can also be provided in the request body as a JSON object
input type for inserting data into table "customers"
Show child attributes
Show child attributes
Response
Responses for POST /api/rest/customers
columns and relationships of "customers"
Show child attributes
Show child attributes

