设置实体卡地址
curl --request POST \
--url http://dev-cn.your-api-server.com/card/setAddress \
--header 'Content-Type: application/json' \
--data '
{
"powerCardId": "<string>",
"country": "<string>",
"address1": "<string>",
"city": "<string>",
"postalCode": "<string>",
"recipientName": "<string>",
"contactMobile": "<string>",
"areaNo": "<string>",
"address2": "<string>",
"address3": "<string>"
}
'import requests
url = "http://dev-cn.your-api-server.com/card/setAddress"
payload = {
"powerCardId": "<string>",
"country": "<string>",
"address1": "<string>",
"city": "<string>",
"postalCode": "<string>",
"recipientName": "<string>",
"contactMobile": "<string>",
"areaNo": "<string>",
"address2": "<string>",
"address3": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
powerCardId: '<string>',
country: '<string>',
address1: '<string>',
city: '<string>',
postalCode: '<string>',
recipientName: '<string>',
contactMobile: '<string>',
areaNo: '<string>',
address2: '<string>',
address3: '<string>'
})
};
fetch('http://dev-cn.your-api-server.com/card/setAddress', 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 => "http://dev-cn.your-api-server.com/card/setAddress",
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([
'powerCardId' => '<string>',
'country' => '<string>',
'address1' => '<string>',
'city' => '<string>',
'postalCode' => '<string>',
'recipientName' => '<string>',
'contactMobile' => '<string>',
'areaNo' => '<string>',
'address2' => '<string>',
'address3' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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 := "http://dev-cn.your-api-server.com/card/setAddress"
payload := strings.NewReader("{\n \"powerCardId\": \"<string>\",\n \"country\": \"<string>\",\n \"address1\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"recipientName\": \"<string>\",\n \"contactMobile\": \"<string>\",\n \"areaNo\": \"<string>\",\n \"address2\": \"<string>\",\n \"address3\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://dev-cn.your-api-server.com/card/setAddress")
.header("Content-Type", "application/json")
.body("{\n \"powerCardId\": \"<string>\",\n \"country\": \"<string>\",\n \"address1\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"recipientName\": \"<string>\",\n \"contactMobile\": \"<string>\",\n \"areaNo\": \"<string>\",\n \"address2\": \"<string>\",\n \"address3\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://dev-cn.your-api-server.com/card/setAddress")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"powerCardId\": \"<string>\",\n \"country\": \"<string>\",\n \"address1\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"recipientName\": \"<string>\",\n \"contactMobile\": \"<string>\",\n \"areaNo\": \"<string>\",\n \"address2\": \"<string>\",\n \"address3\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": false,
"errorCode": "",
"errorMessage": "",
"errorMessageEn": "",
"detailMessage": "",
"requestId": "",
"data": {
"powerCardId": "",
"physicalCardInfoId": 0,
"merchantId": "",
"merchantUserId": "",
"channel": "",
"country": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"postalCode": "",
"recipientName": "",
"contactMobile": "",
"areaNo": "",
"physicalCardStatus": ""
}
}卡片
设置实体卡地址
POST
/
card
/
setAddress
设置实体卡地址
curl --request POST \
--url http://dev-cn.your-api-server.com/card/setAddress \
--header 'Content-Type: application/json' \
--data '
{
"powerCardId": "<string>",
"country": "<string>",
"address1": "<string>",
"city": "<string>",
"postalCode": "<string>",
"recipientName": "<string>",
"contactMobile": "<string>",
"areaNo": "<string>",
"address2": "<string>",
"address3": "<string>"
}
'import requests
url = "http://dev-cn.your-api-server.com/card/setAddress"
payload = {
"powerCardId": "<string>",
"country": "<string>",
"address1": "<string>",
"city": "<string>",
"postalCode": "<string>",
"recipientName": "<string>",
"contactMobile": "<string>",
"areaNo": "<string>",
"address2": "<string>",
"address3": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
powerCardId: '<string>',
country: '<string>',
address1: '<string>',
city: '<string>',
postalCode: '<string>',
recipientName: '<string>',
contactMobile: '<string>',
areaNo: '<string>',
address2: '<string>',
address3: '<string>'
})
};
fetch('http://dev-cn.your-api-server.com/card/setAddress', 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 => "http://dev-cn.your-api-server.com/card/setAddress",
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([
'powerCardId' => '<string>',
'country' => '<string>',
'address1' => '<string>',
'city' => '<string>',
'postalCode' => '<string>',
'recipientName' => '<string>',
'contactMobile' => '<string>',
'areaNo' => '<string>',
'address2' => '<string>',
'address3' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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 := "http://dev-cn.your-api-server.com/card/setAddress"
payload := strings.NewReader("{\n \"powerCardId\": \"<string>\",\n \"country\": \"<string>\",\n \"address1\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"recipientName\": \"<string>\",\n \"contactMobile\": \"<string>\",\n \"areaNo\": \"<string>\",\n \"address2\": \"<string>\",\n \"address3\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://dev-cn.your-api-server.com/card/setAddress")
.header("Content-Type", "application/json")
.body("{\n \"powerCardId\": \"<string>\",\n \"country\": \"<string>\",\n \"address1\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"recipientName\": \"<string>\",\n \"contactMobile\": \"<string>\",\n \"areaNo\": \"<string>\",\n \"address2\": \"<string>\",\n \"address3\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://dev-cn.your-api-server.com/card/setAddress")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"powerCardId\": \"<string>\",\n \"country\": \"<string>\",\n \"address1\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"recipientName\": \"<string>\",\n \"contactMobile\": \"<string>\",\n \"areaNo\": \"<string>\",\n \"address2\": \"<string>\",\n \"address3\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": false,
"errorCode": "",
"errorMessage": "",
"errorMessageEn": "",
"detailMessage": "",
"requestId": "",
"data": {
"powerCardId": "",
"physicalCardInfoId": 0,
"merchantId": "",
"merchantUserId": "",
"channel": "",
"country": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"postalCode": "",
"recipientName": "",
"contactMobile": "",
"areaNo": "",
"physicalCardStatus": ""
}
}请求体
application/json

