Customers
Update customer
Updates an existing customer. Send net_terms as null (or empty string) to clear and inherit from parent.
Send shopify_customer_id to link the customer to a Shopify customer, so that buyer’s Shopify orders attach to this customer when they sync. Linking only records the ID. It doesn’t change anything in Shopify. Send it as null to remove the link. If another customer already has that Shopify customer ID, you get a 422 naming that customer and nothing is changed.
PUT
/
customers
/
{uuid}
Update customer
curl --request PUT \
--url https://api.staging.streamlinedpayments.com/api/v1/customers/{uuid} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-App-Id: <api-key>' \
--data '
{
"customer": {
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"website": "<string>",
"tags": "<string>",
"tax_exempt": true,
"customer_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopify_customer_id": "1234567890",
"shopify_shop_domain": "your-store"
}
}
'const options = {
method: 'PUT',
headers: {
'X-App-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer: {
first_name: '<string>',
last_name: '<string>',
company_name: '<string>',
website: '<string>',
tags: '<string>',
tax_exempt: true,
customer_group_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
shopify_customer_id: '1234567890',
shopify_shop_domain: 'your-store'
}
})
};
fetch('https://api.staging.streamlinedpayments.com/api/v1/customers/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.staging.streamlinedpayments.com/api/v1/customers/{uuid}"
payload = { "customer": {
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"website": "<string>",
"tags": "<string>",
"tax_exempt": True,
"customer_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopify_customer_id": "1234567890",
"shopify_shop_domain": "your-store"
} }
headers = {
"X-App-Id": "<api-key>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.staging.streamlinedpayments.com/api/v1/customers/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-App-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"website\": \"<string>\",\n \"tags\": \"<string>\",\n \"tax_exempt\": true,\n \"customer_group_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"shopify_customer_id\": \"1234567890\",\n \"shopify_shop_domain\": \"your-store\"\n }\n}"
response = http.request(request)
puts response.read_body{
"customer": {
"website": "<string>",
"company_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"first_name": "<string>",
"last_name": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_name": "<string>",
"customer_email": "<string>",
"total_open_balance_amount": 123,
"quick_pay_enabled": true,
"average_days_to_pay": 123,
"net_terms": 0,
"net_terms_label": "<string>",
"shopify_customer_id": "gid://shopify/Customer/1234567890",
"shopify_shop_domain": "your-store",
"application_submitted_at": "2023-11-07T05:31:56Z",
"application_approved_at": "2023-11-07T05:31:56Z",
"customer_group": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_name": "<string>"
},
"billing_address": {
"id": 123,
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"phone": "<string>",
"country": "<string>",
"email": "<string>",
"cc_email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>"
},
"addresses": [
{
"id": 123,
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"phone": "<string>",
"country": "<string>",
"email": "<string>",
"cc_email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>"
}
]
}
}⌘I
Update customer
curl --request PUT \
--url https://api.staging.streamlinedpayments.com/api/v1/customers/{uuid} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-App-Id: <api-key>' \
--data '
{
"customer": {
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"website": "<string>",
"tags": "<string>",
"tax_exempt": true,
"customer_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopify_customer_id": "1234567890",
"shopify_shop_domain": "your-store"
}
}
'const options = {
method: 'PUT',
headers: {
'X-App-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer: {
first_name: '<string>',
last_name: '<string>',
company_name: '<string>',
website: '<string>',
tags: '<string>',
tax_exempt: true,
customer_group_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
shopify_customer_id: '1234567890',
shopify_shop_domain: 'your-store'
}
})
};
fetch('https://api.staging.streamlinedpayments.com/api/v1/customers/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.staging.streamlinedpayments.com/api/v1/customers/{uuid}"
payload = { "customer": {
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"website": "<string>",
"tags": "<string>",
"tax_exempt": True,
"customer_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopify_customer_id": "1234567890",
"shopify_shop_domain": "your-store"
} }
headers = {
"X-App-Id": "<api-key>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.staging.streamlinedpayments.com/api/v1/customers/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-App-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"website\": \"<string>\",\n \"tags\": \"<string>\",\n \"tax_exempt\": true,\n \"customer_group_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"shopify_customer_id\": \"1234567890\",\n \"shopify_shop_domain\": \"your-store\"\n }\n}"
response = http.request(request)
puts response.read_body{
"customer": {
"website": "<string>",
"company_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"first_name": "<string>",
"last_name": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_name": "<string>",
"customer_email": "<string>",
"total_open_balance_amount": 123,
"quick_pay_enabled": true,
"average_days_to_pay": 123,
"net_terms": 0,
"net_terms_label": "<string>",
"shopify_customer_id": "gid://shopify/Customer/1234567890",
"shopify_shop_domain": "your-store",
"application_submitted_at": "2023-11-07T05:31:56Z",
"application_approved_at": "2023-11-07T05:31:56Z",
"customer_group": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_name": "<string>"
},
"billing_address": {
"id": 123,
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"phone": "<string>",
"country": "<string>",
"email": "<string>",
"cc_email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>"
},
"addresses": [
{
"id": 123,
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"phone": "<string>",
"country": "<string>",
"email": "<string>",
"cc_email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>"
}
]
}
}