Update a consumer
curl --request PATCH \
--url https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"phone": "+15559876543",
"address": {
"street": "456 Oak Ave",
"city": "Austin",
"state": "TX",
"postal_code": "73301"
}
}
'import requests
url = "https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id}"
payload = {
"phone": "+15559876543",
"address": {
"street": "456 Oak Ave",
"city": "Austin",
"state": "TX",
"postal_code": "73301"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: '+15559876543',
address: {street: '456 Oak Ave', city: 'Austin', state: 'TX', postal_code: '73301'}
})
};
fetch('https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id}', 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://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id}",
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([
'phone' => '+15559876543',
'address' => [
'street' => '456 Oak Ave',
'city' => 'Austin',
'state' => 'TX',
'postal_code' => '73301'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id}"
payload := strings.NewReader("{\n \"phone\": \"+15559876543\",\n \"address\": {\n \"street\": \"456 Oak Ave\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"73301\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<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.patch("https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"+15559876543\",\n \"address\": {\n \"street\": \"456 Oak Ave\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"73301\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"+15559876543\",\n \"address\": {\n \"street\": \"456 Oak Ave\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"73301\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2023-12-25",
"phone": "<string>",
"email": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "US"
},
"external_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "payment_amount must be a positive integer (cents)",
"field": "payment_amount",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Missing x-api-key header",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Consumer not found",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "CONFLICT",
"message": "A consumer with this email or external_id already exists for this partner",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}Consumers
Update Consumer
Partially update a consumer’s fields. Only include the fields you want to change.
If ssn is provided, it will be re-encrypted. At least one field must be provided.
PATCH
/
consumers
/
{id}
Update a consumer
curl --request PATCH \
--url https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"phone": "+15559876543",
"address": {
"street": "456 Oak Ave",
"city": "Austin",
"state": "TX",
"postal_code": "73301"
}
}
'import requests
url = "https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id}"
payload = {
"phone": "+15559876543",
"address": {
"street": "456 Oak Ave",
"city": "Austin",
"state": "TX",
"postal_code": "73301"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: '+15559876543',
address: {street: '456 Oak Ave', city: 'Austin', state: 'TX', postal_code: '73301'}
})
};
fetch('https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id}', 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://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id}",
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([
'phone' => '+15559876543',
'address' => [
'street' => '456 Oak Ave',
'city' => 'Austin',
'state' => 'TX',
'postal_code' => '73301'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id}"
payload := strings.NewReader("{\n \"phone\": \"+15559876543\",\n \"address\": {\n \"street\": \"456 Oak Ave\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"73301\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<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.patch("https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"+15559876543\",\n \"address\": {\n \"street\": \"456 Oak Ave\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"73301\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"+15559876543\",\n \"address\": {\n \"street\": \"456 Oak Ave\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"73301\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2023-12-25",
"phone": "<string>",
"email": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "US"
},
"external_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "payment_amount must be a positive integer (cents)",
"field": "payment_amount",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Missing x-api-key header",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Consumer not found",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "CONFLICT",
"message": "A consumer with this email or external_id already exists for this partner",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}Authorizations
API key in the format sk_live_<token> (production) or sk_test_<token> (sandbox).
Contact Cove to obtain your API key.
Path Parameters
Resource UUID
Body
application/json
All fields optional. Include only the fields you want to change.
Required string length:
1 - 25Required string length:
1 - 25Maximum string length:
25Pattern:
^\d{3}-?\d{2}-?\d{4}$Pattern:
^\+\d{10,15}$Show child attributes
Show child attributes
Maximum string length:
255⌘I