Set card spending scenes
curl --request POST \
--url https://cc.nadcab.com/api/v1/cards/updateConsumptionScene \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cardId": "CA2506091558586",
"type": 1,
"mccList": [
"4000",
"4001",
"4002"
],
"merchantNameList": [
"google",
"telegram",
"facebook"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cardId: 'CA2506091558586',
type: 1,
mccList: ['4000', '4001', '4002'],
merchantNameList: ['google', 'telegram', 'facebook']
})
};
fetch('https://cc.nadcab.com/api/v1/cards/updateConsumptionScene', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cc.nadcab.com/api/v1/cards/updateConsumptionScene"
payload = {
"cardId": "CA2506091558586",
"type": 1,
"mccList": ["4000", "4001", "4002"],
"merchantNameList": ["google", "telegram", "facebook"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cc.nadcab.com/api/v1/cards/updateConsumptionScene",
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([
'cardId' => 'CA2506091558586',
'type' => 1,
'mccList' => [
'4000',
'4001',
'4002'
],
'merchantNameList' => [
'google',
'telegram',
'facebook'
]
]),
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;
}{
"code": -990,
"msg": "Operation failed: spending scene does not exist: 55,1,88",
"data": null
}Cards
Set card spending scenes
Only scenes returned in the card’s spending scene list can be set.
POST
/
cards
/
updateConsumptionScene
Set card spending scenes
curl --request POST \
--url https://cc.nadcab.com/api/v1/cards/updateConsumptionScene \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cardId": "CA2506091558586",
"type": 1,
"mccList": [
"4000",
"4001",
"4002"
],
"merchantNameList": [
"google",
"telegram",
"facebook"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cardId: 'CA2506091558586',
type: 1,
mccList: ['4000', '4001', '4002'],
merchantNameList: ['google', 'telegram', 'facebook']
})
};
fetch('https://cc.nadcab.com/api/v1/cards/updateConsumptionScene', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cc.nadcab.com/api/v1/cards/updateConsumptionScene"
payload = {
"cardId": "CA2506091558586",
"type": 1,
"mccList": ["4000", "4001", "4002"],
"merchantNameList": ["google", "telegram", "facebook"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cc.nadcab.com/api/v1/cards/updateConsumptionScene",
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([
'cardId' => 'CA2506091558586',
'type' => 1,
'mccList' => [
'4000',
'4001',
'4002'
],
'merchantNameList' => [
'google',
'telegram',
'facebook'
]
]),
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;
}{
"code": -990,
"msg": "Operation failed: spending scene does not exist: 55,1,88",
"data": null
}Authorizations
Your API key from Console → Settings → Key & Access, sent as Authorization: Bearer ncl_....
Body
application/json