Update Card Link Theme
curl --request PUT \
--url https://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Api-Secret: <api-key>' \
--data '
{
"name": "Acme",
"is_default": true,
"logo_url": "https://cdn.acme.com/logo.png",
"font_family": "Inter",
"radius": 10,
"colors": {
"primary": "#0A7C4B",
"primary_text": "#FFFFFF",
"background": "#F6F8F7",
"surface": "#FFFFFF",
"text": "#10231A",
"muted": "#5B6B63",
"border": "#DDE5E0",
"error": "#C62828"
},
"email": {
"sender_name": "Acme Cards",
"reply_to": "cards@acme.com",
"subject": "Your Acme card code",
"intro": "<string>",
"footer": "<string>"
}
}
'import requests
url = "https://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_id}"
payload = {
"name": "Acme",
"is_default": True,
"logo_url": "https://cdn.acme.com/logo.png",
"font_family": "Inter",
"radius": 10,
"colors": {
"primary": "#0A7C4B",
"primary_text": "#FFFFFF",
"background": "#F6F8F7",
"surface": "#FFFFFF",
"text": "#10231A",
"muted": "#5B6B63",
"border": "#DDE5E0",
"error": "#C62828"
},
"email": {
"sender_name": "Acme Cards",
"reply_to": "cards@acme.com",
"subject": "Your Acme card code",
"intro": "<string>",
"footer": "<string>"
}
}
headers = {
"X-Api-Key": "<api-key>",
"X-Api-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Api-Key': '<api-key>',
'X-Api-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Acme',
is_default: true,
logo_url: 'https://cdn.acme.com/logo.png',
font_family: 'Inter',
radius: 10,
colors: {
primary: '#0A7C4B',
primary_text: '#FFFFFF',
background: '#F6F8F7',
surface: '#FFFFFF',
text: '#10231A',
muted: '#5B6B63',
border: '#DDE5E0',
error: '#C62828'
},
email: {
sender_name: 'Acme Cards',
reply_to: 'cards@acme.com',
subject: 'Your Acme card code',
intro: '<string>',
footer: '<string>'
}
})
};
fetch('https://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_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://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Acme',
'is_default' => true,
'logo_url' => 'https://cdn.acme.com/logo.png',
'font_family' => 'Inter',
'radius' => 10,
'colors' => [
'primary' => '#0A7C4B',
'primary_text' => '#FFFFFF',
'background' => '#F6F8F7',
'surface' => '#FFFFFF',
'text' => '#10231A',
'muted' => '#5B6B63',
'border' => '#DDE5E0',
'error' => '#C62828'
],
'email' => [
'sender_name' => 'Acme Cards',
'reply_to' => 'cards@acme.com',
'subject' => 'Your Acme card code',
'intro' => '<string>',
'footer' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>",
"X-Api-Secret: <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://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_id}"
payload := strings.NewReader("{\n \"name\": \"Acme\",\n \"is_default\": true,\n \"logo_url\": \"https://cdn.acme.com/logo.png\",\n \"font_family\": \"Inter\",\n \"radius\": 10,\n \"colors\": {\n \"primary\": \"#0A7C4B\",\n \"primary_text\": \"#FFFFFF\",\n \"background\": \"#F6F8F7\",\n \"surface\": \"#FFFFFF\",\n \"text\": \"#10231A\",\n \"muted\": \"#5B6B63\",\n \"border\": \"#DDE5E0\",\n \"error\": \"#C62828\"\n },\n \"email\": {\n \"sender_name\": \"Acme Cards\",\n \"reply_to\": \"cards@acme.com\",\n \"subject\": \"Your Acme card code\",\n \"intro\": \"<string>\",\n \"footer\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Api-Secret", "<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.put("https://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_id}")
.header("X-Api-Key", "<api-key>")
.header("X-Api-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme\",\n \"is_default\": true,\n \"logo_url\": \"https://cdn.acme.com/logo.png\",\n \"font_family\": \"Inter\",\n \"radius\": 10,\n \"colors\": {\n \"primary\": \"#0A7C4B\",\n \"primary_text\": \"#FFFFFF\",\n \"background\": \"#F6F8F7\",\n \"surface\": \"#FFFFFF\",\n \"text\": \"#10231A\",\n \"muted\": \"#5B6B63\",\n \"border\": \"#DDE5E0\",\n \"error\": \"#C62828\"\n },\n \"email\": {\n \"sender_name\": \"Acme Cards\",\n \"reply_to\": \"cards@acme.com\",\n \"subject\": \"Your Acme card code\",\n \"intro\": \"<string>\",\n \"footer\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["X-Api-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme\",\n \"is_default\": true,\n \"logo_url\": \"https://cdn.acme.com/logo.png\",\n \"font_family\": \"Inter\",\n \"radius\": 10,\n \"colors\": {\n \"primary\": \"#0A7C4B\",\n \"primary_text\": \"#FFFFFF\",\n \"background\": \"#F6F8F7\",\n \"surface\": \"#FFFFFF\",\n \"text\": \"#10231A\",\n \"muted\": \"#5B6B63\",\n \"border\": \"#DDE5E0\",\n \"error\": \"#C62828\"\n },\n \"email\": {\n \"sender_name\": \"Acme Cards\",\n \"reply_to\": \"cards@acme.com\",\n \"subject\": \"Your Acme card code\",\n \"intro\": \"<string>\",\n \"footer\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"status_code": 200,
"message": "Request successful",
"data": {
"theme_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "Acme",
"is_default": true,
"logo_url": "https://cdn.acme.com/logo.png",
"font_family": "Inter",
"radius": 10,
"colors": {
"primary": "#0A7C4B",
"primary_text": "#FFFFFF",
"background": "#F6F8F7",
"surface": "#FFFFFF",
"text": "#10231A",
"muted": "#5B6B63",
"border": "#DDE5E0",
"error": "#C62828"
},
"email": {
"sender_name": "Acme Cards",
"reply_to": "cards@acme.com",
"subject": "Your Acme card code",
"intro": "<string>",
"footer": "<string>"
}
}
}{
"status": "failed",
"status_code": 123,
"message": "Insufficient wallet balance",
"data": {
"error": "Insufficient wallet balance"
},
"error": {
"code": "invalid_argument",
"message": "<string>",
"request_id": "req_5f2c9a1e7b3d4c8a6e0f1b2d"
},
"error_details": {
"code": "validation_error",
"message": "The amount field is required.",
"http_status": 422,
"fields": {},
"retryable": false,
"retry_after": 123
}
}{
"status": "failed",
"status_code": 123,
"message": "Insufficient wallet balance",
"data": {
"error": "Insufficient wallet balance"
},
"error": {
"code": "invalid_argument",
"message": "<string>",
"request_id": "req_5f2c9a1e7b3d4c8a6e0f1b2d"
},
"error_details": {
"code": "validation_error",
"message": "The amount field is required.",
"http_status": 422,
"fields": {},
"retryable": false,
"retry_after": 123
}
}Corporate Card Links
Update Card Link Theme
Change a card link theme
PUT
/
corporate-card
/
card-link
/
themes
/
{theme_id}
Update Card Link Theme
curl --request PUT \
--url https://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Api-Secret: <api-key>' \
--data '
{
"name": "Acme",
"is_default": true,
"logo_url": "https://cdn.acme.com/logo.png",
"font_family": "Inter",
"radius": 10,
"colors": {
"primary": "#0A7C4B",
"primary_text": "#FFFFFF",
"background": "#F6F8F7",
"surface": "#FFFFFF",
"text": "#10231A",
"muted": "#5B6B63",
"border": "#DDE5E0",
"error": "#C62828"
},
"email": {
"sender_name": "Acme Cards",
"reply_to": "cards@acme.com",
"subject": "Your Acme card code",
"intro": "<string>",
"footer": "<string>"
}
}
'import requests
url = "https://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_id}"
payload = {
"name": "Acme",
"is_default": True,
"logo_url": "https://cdn.acme.com/logo.png",
"font_family": "Inter",
"radius": 10,
"colors": {
"primary": "#0A7C4B",
"primary_text": "#FFFFFF",
"background": "#F6F8F7",
"surface": "#FFFFFF",
"text": "#10231A",
"muted": "#5B6B63",
"border": "#DDE5E0",
"error": "#C62828"
},
"email": {
"sender_name": "Acme Cards",
"reply_to": "cards@acme.com",
"subject": "Your Acme card code",
"intro": "<string>",
"footer": "<string>"
}
}
headers = {
"X-Api-Key": "<api-key>",
"X-Api-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Api-Key': '<api-key>',
'X-Api-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Acme',
is_default: true,
logo_url: 'https://cdn.acme.com/logo.png',
font_family: 'Inter',
radius: 10,
colors: {
primary: '#0A7C4B',
primary_text: '#FFFFFF',
background: '#F6F8F7',
surface: '#FFFFFF',
text: '#10231A',
muted: '#5B6B63',
border: '#DDE5E0',
error: '#C62828'
},
email: {
sender_name: 'Acme Cards',
reply_to: 'cards@acme.com',
subject: 'Your Acme card code',
intro: '<string>',
footer: '<string>'
}
})
};
fetch('https://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_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://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Acme',
'is_default' => true,
'logo_url' => 'https://cdn.acme.com/logo.png',
'font_family' => 'Inter',
'radius' => 10,
'colors' => [
'primary' => '#0A7C4B',
'primary_text' => '#FFFFFF',
'background' => '#F6F8F7',
'surface' => '#FFFFFF',
'text' => '#10231A',
'muted' => '#5B6B63',
'border' => '#DDE5E0',
'error' => '#C62828'
],
'email' => [
'sender_name' => 'Acme Cards',
'reply_to' => 'cards@acme.com',
'subject' => 'Your Acme card code',
'intro' => '<string>',
'footer' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>",
"X-Api-Secret: <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://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_id}"
payload := strings.NewReader("{\n \"name\": \"Acme\",\n \"is_default\": true,\n \"logo_url\": \"https://cdn.acme.com/logo.png\",\n \"font_family\": \"Inter\",\n \"radius\": 10,\n \"colors\": {\n \"primary\": \"#0A7C4B\",\n \"primary_text\": \"#FFFFFF\",\n \"background\": \"#F6F8F7\",\n \"surface\": \"#FFFFFF\",\n \"text\": \"#10231A\",\n \"muted\": \"#5B6B63\",\n \"border\": \"#DDE5E0\",\n \"error\": \"#C62828\"\n },\n \"email\": {\n \"sender_name\": \"Acme Cards\",\n \"reply_to\": \"cards@acme.com\",\n \"subject\": \"Your Acme card code\",\n \"intro\": \"<string>\",\n \"footer\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Api-Secret", "<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.put("https://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_id}")
.header("X-Api-Key", "<api-key>")
.header("X-Api-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme\",\n \"is_default\": true,\n \"logo_url\": \"https://cdn.acme.com/logo.png\",\n \"font_family\": \"Inter\",\n \"radius\": 10,\n \"colors\": {\n \"primary\": \"#0A7C4B\",\n \"primary_text\": \"#FFFFFF\",\n \"background\": \"#F6F8F7\",\n \"surface\": \"#FFFFFF\",\n \"text\": \"#10231A\",\n \"muted\": \"#5B6B63\",\n \"border\": \"#DDE5E0\",\n \"error\": \"#C62828\"\n },\n \"email\": {\n \"sender_name\": \"Acme Cards\",\n \"reply_to\": \"cards@acme.com\",\n \"subject\": \"Your Acme card code\",\n \"intro\": \"<string>\",\n \"footer\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yativo.com/api/v1/corporate-card/card-link/themes/{theme_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["X-Api-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme\",\n \"is_default\": true,\n \"logo_url\": \"https://cdn.acme.com/logo.png\",\n \"font_family\": \"Inter\",\n \"radius\": 10,\n \"colors\": {\n \"primary\": \"#0A7C4B\",\n \"primary_text\": \"#FFFFFF\",\n \"background\": \"#F6F8F7\",\n \"surface\": \"#FFFFFF\",\n \"text\": \"#10231A\",\n \"muted\": \"#5B6B63\",\n \"border\": \"#DDE5E0\",\n \"error\": \"#C62828\"\n },\n \"email\": {\n \"sender_name\": \"Acme Cards\",\n \"reply_to\": \"cards@acme.com\",\n \"subject\": \"Your Acme card code\",\n \"intro\": \"<string>\",\n \"footer\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"status_code": 200,
"message": "Request successful",
"data": {
"theme_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "Acme",
"is_default": true,
"logo_url": "https://cdn.acme.com/logo.png",
"font_family": "Inter",
"radius": 10,
"colors": {
"primary": "#0A7C4B",
"primary_text": "#FFFFFF",
"background": "#F6F8F7",
"surface": "#FFFFFF",
"text": "#10231A",
"muted": "#5B6B63",
"border": "#DDE5E0",
"error": "#C62828"
},
"email": {
"sender_name": "Acme Cards",
"reply_to": "cards@acme.com",
"subject": "Your Acme card code",
"intro": "<string>",
"footer": "<string>"
}
}
}{
"status": "failed",
"status_code": 123,
"message": "Insufficient wallet balance",
"data": {
"error": "Insufficient wallet balance"
},
"error": {
"code": "invalid_argument",
"message": "<string>",
"request_id": "req_5f2c9a1e7b3d4c8a6e0f1b2d"
},
"error_details": {
"code": "validation_error",
"message": "The amount field is required.",
"http_status": 422,
"fields": {},
"retryable": false,
"retry_after": 123
}
}{
"status": "failed",
"status_code": 123,
"message": "Insufficient wallet balance",
"data": {
"error": "Insufficient wallet balance"
},
"error": {
"code": "invalid_argument",
"message": "<string>",
"request_id": "req_5f2c9a1e7b3d4c8a6e0f1b2d"
},
"error_details": {
"code": "validation_error",
"message": "The amount field is required.",
"http_status": 422,
"fields": {},
"retryable": false,
"retry_after": 123
}
}Send only the fields you’re changing.
Authorizations
Body
application/json

