Update customers (bulk)
curl --request PATCH \
--url https://firespark.cloud/api/admin/v1/customers/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"name": "John Smith",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"phone": "+593 99 123 4567",
"delivery_addresses": [
{
"alias": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"reference": "<string>",
"latitude": 0,
"longitude": 0,
"instructions": "<string>",
"preferred": false,
"metadata": {}
}
],
"billing_profiles": [
{
"alias": "<string>",
"legal_name": "<string>",
"address_line1": "<string>",
"tax_id": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"preferred": false,
"metadata": {}
}
],
"metadata": {}
}
]
'import requests
url = "https://firespark.cloud/api/admin/v1/customers/bulk"
payload = [
{
"name": "John Smith",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"phone": "+593 99 123 4567",
"delivery_addresses": [
{
"alias": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"reference": "<string>",
"latitude": 0,
"longitude": 0,
"instructions": "<string>",
"preferred": False,
"metadata": {}
}
],
"billing_profiles": [
{
"alias": "<string>",
"legal_name": "<string>",
"address_line1": "<string>",
"tax_id": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"preferred": False,
"metadata": {}
}
],
"metadata": {}
}
]
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 Smith',
dob: '2023-11-07T05:31:56Z',
document_type: '<string>',
document_number: '<string>',
country: '<string>',
phone: '+593 99 123 4567',
delivery_addresses: [
{
alias: '<string>',
address_line1: '<string>',
address_line2: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>',
reference: '<string>',
latitude: 0,
longitude: 0,
instructions: '<string>',
preferred: false,
metadata: {}
}
],
billing_profiles: [
{
alias: '<string>',
legal_name: '<string>',
address_line1: '<string>',
tax_id: '<string>',
address_line2: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>',
preferred: false,
metadata: {}
}
],
metadata: {}
}
])
};
fetch('https://firespark.cloud/api/admin/v1/customers/bulk', 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://firespark.cloud/api/admin/v1/customers/bulk",
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 Smith',
'dob' => '2023-11-07T05:31:56Z',
'document_type' => '<string>',
'document_number' => '<string>',
'country' => '<string>',
'phone' => '+593 99 123 4567',
'delivery_addresses' => [
[
'alias' => '<string>',
'address_line1' => '<string>',
'address_line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>',
'reference' => '<string>',
'latitude' => 0,
'longitude' => 0,
'instructions' => '<string>',
'preferred' => false,
'metadata' => [
]
]
],
'billing_profiles' => [
[
'alias' => '<string>',
'legal_name' => '<string>',
'address_line1' => '<string>',
'tax_id' => '<string>',
'address_line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>',
'preferred' => false,
'metadata' => [
]
]
],
'metadata' => [
]
]
]),
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://firespark.cloud/api/admin/v1/customers/bulk"
payload := strings.NewReader("[\n {\n \"name\": \"John Smith\",\n \"dob\": \"2023-11-07T05:31:56Z\",\n \"document_type\": \"<string>\",\n \"document_number\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"+593 99 123 4567\",\n \"delivery_addresses\": [\n {\n \"alias\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\",\n \"reference\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"instructions\": \"<string>\",\n \"preferred\": false,\n \"metadata\": {}\n }\n ],\n \"billing_profiles\": [\n {\n \"alias\": \"<string>\",\n \"legal_name\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\",\n \"preferred\": false,\n \"metadata\": {}\n }\n ],\n \"metadata\": {}\n }\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://firespark.cloud/api/admin/v1/customers/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"name\": \"John Smith\",\n \"dob\": \"2023-11-07T05:31:56Z\",\n \"document_type\": \"<string>\",\n \"document_number\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"+593 99 123 4567\",\n \"delivery_addresses\": [\n {\n \"alias\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\",\n \"reference\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"instructions\": \"<string>\",\n \"preferred\": false,\n \"metadata\": {}\n }\n ],\n \"billing_profiles\": [\n {\n \"alias\": \"<string>\",\n \"legal_name\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\",\n \"preferred\": false,\n \"metadata\": {}\n }\n ],\n \"metadata\": {}\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://firespark.cloud/api/admin/v1/customers/bulk")
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 {\n \"name\": \"John Smith\",\n \"dob\": \"2023-11-07T05:31:56Z\",\n \"document_type\": \"<string>\",\n \"document_number\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"+593 99 123 4567\",\n \"delivery_addresses\": [\n {\n \"alias\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\",\n \"reference\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"instructions\": \"<string>\",\n \"preferred\": false,\n \"metadata\": {}\n }\n ],\n \"billing_profiles\": [\n {\n \"alias\": \"<string>\",\n \"legal_name\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\",\n \"preferred\": false,\n \"metadata\": {}\n }\n ],\n \"metadata\": {}\n }\n]"
response = http.request(request)
puts response.read_body{
"data": {}
}Customers
Update customers (bulk)
PATCH
/
customers
/
bulk
Update customers (bulk)
curl --request PATCH \
--url https://firespark.cloud/api/admin/v1/customers/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"name": "John Smith",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"phone": "+593 99 123 4567",
"delivery_addresses": [
{
"alias": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"reference": "<string>",
"latitude": 0,
"longitude": 0,
"instructions": "<string>",
"preferred": false,
"metadata": {}
}
],
"billing_profiles": [
{
"alias": "<string>",
"legal_name": "<string>",
"address_line1": "<string>",
"tax_id": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"preferred": false,
"metadata": {}
}
],
"metadata": {}
}
]
'import requests
url = "https://firespark.cloud/api/admin/v1/customers/bulk"
payload = [
{
"name": "John Smith",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"phone": "+593 99 123 4567",
"delivery_addresses": [
{
"alias": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"reference": "<string>",
"latitude": 0,
"longitude": 0,
"instructions": "<string>",
"preferred": False,
"metadata": {}
}
],
"billing_profiles": [
{
"alias": "<string>",
"legal_name": "<string>",
"address_line1": "<string>",
"tax_id": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"preferred": False,
"metadata": {}
}
],
"metadata": {}
}
]
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 Smith',
dob: '2023-11-07T05:31:56Z',
document_type: '<string>',
document_number: '<string>',
country: '<string>',
phone: '+593 99 123 4567',
delivery_addresses: [
{
alias: '<string>',
address_line1: '<string>',
address_line2: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>',
reference: '<string>',
latitude: 0,
longitude: 0,
instructions: '<string>',
preferred: false,
metadata: {}
}
],
billing_profiles: [
{
alias: '<string>',
legal_name: '<string>',
address_line1: '<string>',
tax_id: '<string>',
address_line2: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>',
preferred: false,
metadata: {}
}
],
metadata: {}
}
])
};
fetch('https://firespark.cloud/api/admin/v1/customers/bulk', 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://firespark.cloud/api/admin/v1/customers/bulk",
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 Smith',
'dob' => '2023-11-07T05:31:56Z',
'document_type' => '<string>',
'document_number' => '<string>',
'country' => '<string>',
'phone' => '+593 99 123 4567',
'delivery_addresses' => [
[
'alias' => '<string>',
'address_line1' => '<string>',
'address_line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>',
'reference' => '<string>',
'latitude' => 0,
'longitude' => 0,
'instructions' => '<string>',
'preferred' => false,
'metadata' => [
]
]
],
'billing_profiles' => [
[
'alias' => '<string>',
'legal_name' => '<string>',
'address_line1' => '<string>',
'tax_id' => '<string>',
'address_line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>',
'preferred' => false,
'metadata' => [
]
]
],
'metadata' => [
]
]
]),
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://firespark.cloud/api/admin/v1/customers/bulk"
payload := strings.NewReader("[\n {\n \"name\": \"John Smith\",\n \"dob\": \"2023-11-07T05:31:56Z\",\n \"document_type\": \"<string>\",\n \"document_number\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"+593 99 123 4567\",\n \"delivery_addresses\": [\n {\n \"alias\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\",\n \"reference\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"instructions\": \"<string>\",\n \"preferred\": false,\n \"metadata\": {}\n }\n ],\n \"billing_profiles\": [\n {\n \"alias\": \"<string>\",\n \"legal_name\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\",\n \"preferred\": false,\n \"metadata\": {}\n }\n ],\n \"metadata\": {}\n }\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://firespark.cloud/api/admin/v1/customers/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"name\": \"John Smith\",\n \"dob\": \"2023-11-07T05:31:56Z\",\n \"document_type\": \"<string>\",\n \"document_number\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"+593 99 123 4567\",\n \"delivery_addresses\": [\n {\n \"alias\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\",\n \"reference\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"instructions\": \"<string>\",\n \"preferred\": false,\n \"metadata\": {}\n }\n ],\n \"billing_profiles\": [\n {\n \"alias\": \"<string>\",\n \"legal_name\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\",\n \"preferred\": false,\n \"metadata\": {}\n }\n ],\n \"metadata\": {}\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://firespark.cloud/api/admin/v1/customers/bulk")
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 {\n \"name\": \"John Smith\",\n \"dob\": \"2023-11-07T05:31:56Z\",\n \"document_type\": \"<string>\",\n \"document_number\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"+593 99 123 4567\",\n \"delivery_addresses\": [\n {\n \"alias\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\",\n \"reference\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"instructions\": \"<string>\",\n \"preferred\": false,\n \"metadata\": {}\n }\n ],\n \"billing_profiles\": [\n {\n \"alias\": \"<string>\",\n \"legal_name\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\",\n \"preferred\": false,\n \"metadata\": {}\n }\n ],\n \"metadata\": {}\n }\n]"
response = http.request(request)
puts response.read_body{
"data": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Customers to update.
The full name of the customer
Example:
"John Smith"
The gender of the customer
Available options:
MALE, FEMALE, OTHER The date of birth of the customer
The document type of the customer
The document number of the customer
Maximum string length:
50The country of the customer
Maximum string length:
100The customer's phone number in international format
Example:
"+593 99 123 4567"
Maximum array length:
10Show child attributes
Show child attributes
Maximum array length:
10Show child attributes
Show child attributes
Custom metadata for the customer
Response
200 - application/json
Ok
⌘I