Replace Card Link
curl --request POST \
--url https://api.yativo.com/api/v1/corporate-card/employees/cards/{card_id}/link/rotate \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Api-Secret: <api-key>' \
--data '
{
"theme_id": "<string>"
}
'import requests
url = "https://api.yativo.com/api/v1/corporate-card/employees/cards/{card_id}/link/rotate"
payload = { "theme_id": "<string>" }
headers = {
"X-Api-Key": "<api-key>",
"X-Api-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Api-Key': '<api-key>',
'X-Api-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({theme_id: '<string>'})
};
fetch('https://api.yativo.com/api/v1/corporate-card/employees/cards/{card_id}/link/rotate', 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/employees/cards/{card_id}/link/rotate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'theme_id' => '<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/employees/cards/{card_id}/link/rotate"
payload := strings.NewReader("{\n \"theme_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.yativo.com/api/v1/corporate-card/employees/cards/{card_id}/link/rotate")
.header("X-Api-Key", "<api-key>")
.header("X-Api-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"theme_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yativo.com/api/v1/corporate-card/employees/cards/{card_id}/link/rotate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["X-Api-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"theme_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"status_code": 200,
"message": "Request successful",
"data": {
"card_id": "9b1d3c52-0f0e-4a8e-b0b1-6f7a1c2d3e4f",
"url": "https://checkout.yativo.com/card-access/cl_Vq3eX9...",
"created_at": "2023-11-07T05:31:56Z",
"rotated_at": "2023-11-07T05:31:56Z"
}
}{
"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
Replace Card Link
Replace a card’s link so the old URL stops working
POST
/
corporate-card
/
employees
/
cards
/
{card_id}
/
link
/
rotate
Replace Card Link
curl --request POST \
--url https://api.yativo.com/api/v1/corporate-card/employees/cards/{card_id}/link/rotate \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Api-Secret: <api-key>' \
--data '
{
"theme_id": "<string>"
}
'import requests
url = "https://api.yativo.com/api/v1/corporate-card/employees/cards/{card_id}/link/rotate"
payload = { "theme_id": "<string>" }
headers = {
"X-Api-Key": "<api-key>",
"X-Api-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Api-Key': '<api-key>',
'X-Api-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({theme_id: '<string>'})
};
fetch('https://api.yativo.com/api/v1/corporate-card/employees/cards/{card_id}/link/rotate', 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/employees/cards/{card_id}/link/rotate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'theme_id' => '<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/employees/cards/{card_id}/link/rotate"
payload := strings.NewReader("{\n \"theme_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.yativo.com/api/v1/corporate-card/employees/cards/{card_id}/link/rotate")
.header("X-Api-Key", "<api-key>")
.header("X-Api-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"theme_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yativo.com/api/v1/corporate-card/employees/cards/{card_id}/link/rotate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["X-Api-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"theme_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"status_code": 200,
"message": "Request successful",
"data": {
"card_id": "9b1d3c52-0f0e-4a8e-b0b1-6f7a1c2d3e4f",
"url": "https://checkout.yativo.com/card-access/cl_Vq3eX9...",
"created_at": "2023-11-07T05:31:56Z",
"rotated_at": "2023-11-07T05:31:56Z"
}
}{
"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
}
}Use this if a link was shared somewhere it shouldn’t be. The old URL stops working straight away, including anywhere it’s embedded. The employee keeps their passkey or authenticator app.
Authorizations
Your API key (yativo_pk_...) from Developers → API Keys. Send together with X-Api-Secret.
Your API secret (yativo_sk_...), shown once when the key is created.
Path Parameters
The card's card_id.
Body
application/json
Optional theme for the returned URL.

