curl --request PATCH \
--url https://api.justpaid.io/api/v1/customer/{customer_uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "John Doe",
"external_id": "CUST-001",
"billing_address": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"shipping_address": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"currency": "USD",
"tax_exempt": false,
"contact_name": "<string>",
"email": "<string>",
"additional_emails": [
"<unknown>"
],
"billing_emails": [
"<unknown>"
],
"phone_number": "<string>",
"tax_id": "<string>"
}
'import requests
url = "https://api.justpaid.io/api/v1/customer/{customer_uuid}"
payload = {
"name": "John Doe",
"external_id": "CUST-001",
"billing_address": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"shipping_address": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"currency": "USD",
"tax_exempt": False,
"contact_name": "<string>",
"email": "<string>",
"additional_emails": ["<unknown>"],
"billing_emails": ["<unknown>"],
"phone_number": "<string>",
"tax_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'John Doe',
external_id: 'CUST-001',
billing_address: {
address_line1: '<string>',
address_line2: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
},
shipping_address: {
address_line1: '<string>',
address_line2: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
},
currency: 'USD',
tax_exempt: false,
contact_name: '<string>',
email: '<string>',
additional_emails: ['<unknown>'],
billing_emails: ['<unknown>'],
phone_number: '<string>',
tax_id: '<string>'
})
};
fetch('https://api.justpaid.io/api/v1/customer/{customer_uuid}', 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.justpaid.io/api/v1/customer/{customer_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'John Doe',
'external_id' => 'CUST-001',
'billing_address' => [
'address_line1' => '<string>',
'address_line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
],
'shipping_address' => [
'address_line1' => '<string>',
'address_line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
],
'currency' => 'USD',
'tax_exempt' => false,
'contact_name' => '<string>',
'email' => '<string>',
'additional_emails' => [
'<unknown>'
],
'billing_emails' => [
'<unknown>'
],
'phone_number' => '<string>',
'tax_id' => '<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.justpaid.io/api/v1/customer/{customer_uuid}"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"external_id\": \"CUST-001\",\n \"billing_address\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"shipping_address\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"currency\": \"USD\",\n \"tax_exempt\": false,\n \"contact_name\": \"<string>\",\n \"email\": \"<string>\",\n \"additional_emails\": [\n \"<unknown>\"\n ],\n \"billing_emails\": [\n \"<unknown>\"\n ],\n \"phone_number\": \"<string>\",\n \"tax_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.justpaid.io/api/v1/customer/{customer_uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"external_id\": \"CUST-001\",\n \"billing_address\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"shipping_address\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"currency\": \"USD\",\n \"tax_exempt\": false,\n \"contact_name\": \"<string>\",\n \"email\": \"<string>\",\n \"additional_emails\": [\n \"<unknown>\"\n ],\n \"billing_emails\": [\n \"<unknown>\"\n ],\n \"phone_number\": \"<string>\",\n \"tax_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justpaid.io/api/v1/customer/{customer_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"external_id\": \"CUST-001\",\n \"billing_address\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"shipping_address\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"currency\": \"USD\",\n \"tax_exempt\": false,\n \"contact_name\": \"<string>\",\n \"email\": \"<string>\",\n \"additional_emails\": [\n \"<unknown>\"\n ],\n \"billing_emails\": [\n \"<unknown>\"\n ],\n \"phone_number\": \"<string>\",\n \"tax_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "Updated Name",
"email": "updated.email@example.com",
"external_id": "CUST-002",
"billing_address": {
"address_line1": "789 New St",
"city": "New City",
"state": "NY",
"zip": "54321",
"country": "US"
},
"shipping_address": {
"address_line1": "321 Ship St",
"city": "Ship City",
"state": "CA",
"zip": "98765",
"country": "US"
}
}{
"detail": "Customer with UUID X not found"
}Customer Update Api
Updates a customer’s information.
curl --request PATCH \
--url https://api.justpaid.io/api/v1/customer/{customer_uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "John Doe",
"external_id": "CUST-001",
"billing_address": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"shipping_address": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"currency": "USD",
"tax_exempt": false,
"contact_name": "<string>",
"email": "<string>",
"additional_emails": [
"<unknown>"
],
"billing_emails": [
"<unknown>"
],
"phone_number": "<string>",
"tax_id": "<string>"
}
'import requests
url = "https://api.justpaid.io/api/v1/customer/{customer_uuid}"
payload = {
"name": "John Doe",
"external_id": "CUST-001",
"billing_address": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"shipping_address": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"currency": "USD",
"tax_exempt": False,
"contact_name": "<string>",
"email": "<string>",
"additional_emails": ["<unknown>"],
"billing_emails": ["<unknown>"],
"phone_number": "<string>",
"tax_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'John Doe',
external_id: 'CUST-001',
billing_address: {
address_line1: '<string>',
address_line2: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
},
shipping_address: {
address_line1: '<string>',
address_line2: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
},
currency: 'USD',
tax_exempt: false,
contact_name: '<string>',
email: '<string>',
additional_emails: ['<unknown>'],
billing_emails: ['<unknown>'],
phone_number: '<string>',
tax_id: '<string>'
})
};
fetch('https://api.justpaid.io/api/v1/customer/{customer_uuid}', 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.justpaid.io/api/v1/customer/{customer_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'John Doe',
'external_id' => 'CUST-001',
'billing_address' => [
'address_line1' => '<string>',
'address_line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
],
'shipping_address' => [
'address_line1' => '<string>',
'address_line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
],
'currency' => 'USD',
'tax_exempt' => false,
'contact_name' => '<string>',
'email' => '<string>',
'additional_emails' => [
'<unknown>'
],
'billing_emails' => [
'<unknown>'
],
'phone_number' => '<string>',
'tax_id' => '<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.justpaid.io/api/v1/customer/{customer_uuid}"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"external_id\": \"CUST-001\",\n \"billing_address\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"shipping_address\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"currency\": \"USD\",\n \"tax_exempt\": false,\n \"contact_name\": \"<string>\",\n \"email\": \"<string>\",\n \"additional_emails\": [\n \"<unknown>\"\n ],\n \"billing_emails\": [\n \"<unknown>\"\n ],\n \"phone_number\": \"<string>\",\n \"tax_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.justpaid.io/api/v1/customer/{customer_uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"external_id\": \"CUST-001\",\n \"billing_address\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"shipping_address\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"currency\": \"USD\",\n \"tax_exempt\": false,\n \"contact_name\": \"<string>\",\n \"email\": \"<string>\",\n \"additional_emails\": [\n \"<unknown>\"\n ],\n \"billing_emails\": [\n \"<unknown>\"\n ],\n \"phone_number\": \"<string>\",\n \"tax_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justpaid.io/api/v1/customer/{customer_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"external_id\": \"CUST-001\",\n \"billing_address\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"shipping_address\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"currency\": \"USD\",\n \"tax_exempt\": false,\n \"contact_name\": \"<string>\",\n \"email\": \"<string>\",\n \"additional_emails\": [\n \"<unknown>\"\n ],\n \"billing_emails\": [\n \"<unknown>\"\n ],\n \"phone_number\": \"<string>\",\n \"tax_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "Updated Name",
"email": "updated.email@example.com",
"external_id": "CUST-002",
"billing_address": {
"address_line1": "789 New St",
"city": "New City",
"state": "NY",
"zip": "54321",
"country": "US"
},
"shipping_address": {
"address_line1": "321 Ship St",
"city": "Ship City",
"state": "CA",
"zip": "98765",
"country": "US"
}
}{
"detail": "Customer with UUID X not found"
}Authorizations
Body
Schema for creating or updating a customer.
Attributes: name (str): The name of the customer. contact_name (Optional[str]): The name of the contact person for the customer. email (Optional[str]): The primary email address of the customer. additional_emails (Optional[List[str]]): A list of additional email addresses for the customer. billing_emails (Optional[List[str]]): A list of email addresses used for billing purposes. phone_number (Optional[str]): The customer's phone number, including country code. currency (Optional[str]): The currency used by the customer, defaulting to USD. tax_id (Optional[str]): The customer's tax identification number. billing_address (Optional[AddressSchema]): The customer's billing address. shipping_address (Optional[AddressSchema]): The customer's shipping address. external_id (Optional[str]): An external identifier for the customer.
Response
Customer updated successfully
Schema for retrieving customer information.
Attributes: uuid (UUID): The unique identifier for the customer. name (str): The name of the customer. contact_name (Optional[str]): The name of the contact person for the customer. email (Optional[str]): The primary email address of the customer. additional_emails (Optional[List[str]]): A list of additional email addresses for the customer. billing_emails (Optional[List[str]]): A list of email addresses used for billing purposes. phone_number (Optional[str]): The customer's phone number, including country code. currency (Optional[str]): The currency used by the customer. tax_id (Optional[str]): The customer's tax identification number. billing_address (Optional[AddressSchema]): The customer's billing address. shipping_address (Optional[AddressSchema]): The customer's shipping address. external_id (Optional[str]): An external identifier for the customer, aliased as 'external_customer_id'.
Was this page helpful?
