Update a cardholder
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({phone: {number: '<string>', country_code: '<string>'}})
};
fetch('https://core.prod.gnosispay.com/partner-api/v1/cardholders/{cardholder_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://core.prod.gnosispay.com/partner-api/v1/cardholders/{cardholder_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": {
"number": "<string>",
"country_code": "<string>"
}
}
'import requests
url = "https://core.prod.gnosispay.com/partner-api/v1/cardholders/{cardholder_id}"
payload = { "phone": {
"number": "<string>",
"country_code": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.prod.gnosispay.com/partner-api/v1/cardholders/{cardholder_id}"
payload := strings.NewReader("{\n \"phone\": {\n \"number\": \"<string>\",\n \"country_code\": \"<string>\"\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://core.prod.gnosispay.com/partner-api/v1/cardholders/{cardholder_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": {\n \"number\": \"<string>\",\n \"country_code\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.prod.gnosispay.com/partner-api/v1/cardholders/{cardholder_id}")
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 \"phone\": {\n \"number\": \"<string>\",\n \"country_code\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"message": "<string>",
"reason": "<string>"
}Cards
Update a cardholder
Replaces the cardholder’s contact phone number. Send both the country calling code and national number.
PATCH
/
v1
/
cardholders
/
{cardholder_id}
Update a cardholder
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({phone: {number: '<string>', country_code: '<string>'}})
};
fetch('https://core.prod.gnosispay.com/partner-api/v1/cardholders/{cardholder_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://core.prod.gnosispay.com/partner-api/v1/cardholders/{cardholder_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": {
"number": "<string>",
"country_code": "<string>"
}
}
'import requests
url = "https://core.prod.gnosispay.com/partner-api/v1/cardholders/{cardholder_id}"
payload = { "phone": {
"number": "<string>",
"country_code": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.prod.gnosispay.com/partner-api/v1/cardholders/{cardholder_id}"
payload := strings.NewReader("{\n \"phone\": {\n \"number\": \"<string>\",\n \"country_code\": \"<string>\"\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://core.prod.gnosispay.com/partner-api/v1/cardholders/{cardholder_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": {\n \"number\": \"<string>\",\n \"country_code\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.prod.gnosispay.com/partner-api/v1/cardholders/{cardholder_id}")
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 \"phone\": {\n \"number\": \"<string>\",\n \"country_code\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"message": "<string>",
"reason": "<string>"
}